// 摘要: // Represents a strongly typed list of objects that can be accessed by index. // Provides methods to search, sort, and manipulate lists. // // 类型参数: // T: // The type of elements in the list. [Serializable] [DebuggerDisplay("Count = {Count}")] public class List<T> : IList<T>, ICollection<T>, IEnumerable<T>, IList, ICollection, IEnumerable
{ // 摘要: // Initializes a new instance of the System.Collections.Generic.List<T> class // that is empty and has the default initial capacity. public List(); // // 摘要: // Initializes a new instance of the System.Collections.Generic.List<T> class // that contains elements copied from the specified collection and has sufficient // capacity to accommodate the number of elements copied. // // 参数: // collection: // The collection whose elements are copied to the new list. // // 异常: // System.ArgumentNullException: // collection is null. public List(IEnumerable<T> collection);