Where Are Value Types Stored In (C#) Generic Collections

后端 未结 5 1737
北海茫月
北海茫月 2021-02-08 09:31

It is true that generic collections perform better than non-generic collections for value types. (i.e. List vs. ArrayList).

But why is that, other than the boxing-unboxi

5条回答
  •  谎友^
    谎友^ (楼主)
    2021-02-08 10:06

    There are several reasons besides boxing and unboxing, including memory caching and the way they are enumerated to perform their jobs. Check out this post, especially the comments.

提交回复
热议问题