How is List<T> internally mapped?
问题 Does it internally get treated as an Array or does it get treated as a totally different type by the CLR? I am trying to implement integer values to the list. List<int> lst = new List<int>(); lst.Add(3); lst.Add(4); vs. I create an Array of integers int[] arr = new int[2]; arr[0] = 3; arr[1] = 4; Array returns better time span results. So why do people prefer List<>. 回答1: List<> is an implementation of a data structure, which takes care of allocating memory on a on-demand basis; it allows for