c# - Difference between ImmutableArray<T> and ImmutableList<T> -


what difference between immutablearray<t> , immutablelist<t>, , best use each?

i think asking use both. blog otherwise points mentioned here.

use immutable array when:

  • updating data rare or number of elements quite small (<16)
  • you need able iterate on data in performance critical sections
  • you have many instances of immutable collections , can’t afford keeping data in trees

use immutable list when:

  • updating data common or number of elements isn't expected small
  • updating collection more performance critical iterating contents

Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

android - Keyboard hides my half of edit-text and button below it even in scroll view -

css - Make div keyboard-scrollable in jQuery Mobile? -