经常听人说C#中的Array分配的内存是连续的,List分配的是不连续的,为什么呢?List实现也是由Array存储的数据呀,为什么会有这个说法?这个说法对吗?感谢各位大佬!!!
如果你说的是 System.Collections.Generic.List<T> 的话,那肯定是连续的。
System.Collections.Generic.List<T>
文档原文:It implements the IList<T> generic interface by using an array whose size is dynamically increased as required.
2.1m questions
2.1m answers
57 comments
56.1k users