The methods of System.Collections.Generic.List<T> are listed below. For a list of all members, see the List<T> Members list.
See Also: Inherited members from System.Object
Add(T)Adds an item to the end of the list. | ||
AddRange(IEnumerable<T>)Adds the elements of the specified collection to the end of the list. | ||
AsReadOnly()Returns a read-only wrapper to the current List. | ||
BinarySearch(T)Searches the entire sorted list for an element using the default comparer, and returns the zero-based index of the element. | ||
BinarySearch(T, IComparer<T>)Searches the entire sorted list for an element using the specified comparer and returns the zero-based index of the element. | ||
BinarySearch(int, int, T, IComparer<T>)Searches a range of elements in the sorted list for an element using the specified comparer and returns the zero-based index of the element. | ||
Clear()Removes all elements from the list. | ||
Contains(T)Determines whether the list contains a specific value. | ||
ConvertAll<TOutput>(Converter<T, TOutput>)Documentation for this section has not yet been entered. | ||
CopyTo(T[])Copies the entire list to an array. | ||
CopyTo(T[], int)Copies the elements of the list to an array, starting at a particular index. | ||
CopyTo(int, T[], int, int)Copies a range of elements of the list to an array, starting at a particular index in the target array. | ||
Exists(Predicate<T>)Determines whether the List contains elements that match the conditions defined by the specified predicate. | ||
Find(Predicate<T>)Searches for an element that matches the conditions defined by the specified predicate, and returns the first occurrence within the entire List. | ||
FindAll(Predicate<T>)Retrieves all the elements that match the conditions defined by the specified predicate. | ||
FindIndex(Predicate<T>)Searches for an element that matches the conditions defined by the specified predicate, and returns the zero-based index of the first occurrence within the List. | ||
FindIndex(int, Predicate<T>)Searches for an element that matches the conditions defined by the specified predicate, and returns the zero-based index of the first occurrence within the range of elements in the List that extends from the specified index to the last element. | ||
FindIndex(int, int, Predicate<T>)Searches for an element that matches the conditions defined by the specified predicate, and returns the zero-based index of the first occurrence within the range of elements in the List that starts at the specified index and contains the specified number of elements. | ||
FindLast(Predicate<T>)Searches for an element that matches the conditions defined by the specified predicate, and returns the last occurrence within the entire List. | ||
FindLastIndex(Predicate<T>)Searches for an element that matches the conditions defined by the specified predicate, and returns the zero-based index of the last occurrence within the List. | ||
FindLastIndex(int, Predicate<T>)Searches for an element that matches the conditions defined by the specified predicate, and returns the zero-based index of the last occurrence within the range of elements in the List that extends from the specified index to the first element. | ||
FindLastIndex(int, int, Predicate<T>)Searches for an element that matches the conditions defined by the specified predicate, and returns the zero-based index of the last occurrence within the range of elements in the List that starts at the specified index and contains the specified number of elements going backwards. | ||
ForEach(Action<T>)Performs the specified action on each element of the List. | ||
GetEnumerator()Returns an enumerator, in index order, that can be used to iterate over the list. | ||
GetRange(int, int)Creates a shallow copy of a range of elements in the current List. | ||
IndexOf(T)Searches for the specified object and returns the zero-based index of the first occurrence within the entire list. | ||
IndexOf(T, int)Searches for the specified object and returns the zero-based index of the first occurrence within the range of elements in the list that extends from the specified index to the last element. | ||
IndexOf(T, int, int)Searches for the specified object and returns the zero-based index of the first occurrence within the range of elements in the list that starts at the specified index and contains the specified number of elements. | ||
Insert(int, T)Inserts an item to the List at the specified position. | ||
InsertRange(int, IEnumerable<T>)Inserts the elements of a collection in the List at the specified position. | ||
LastIndexOf(T)Searches for the specified object and returns the zero-based index of the last occurrence within the entire list. | ||
LastIndexOf(T, int)Searches for the specified object and returns the zero-based index of the last occurrence within the range of elements in the list that extends from the specified index to the last element. | ||
LastIndexOf(T, int, int)Searches for the specified object and returns the zero-based index of the last occurrence within the range of elements in the list that starts at the specified index and contains the specified number of elements. | ||
Remove(T)Removes the first occurrence of the specified object from the list. | ||
RemoveAll(Predicate<T>)Removes the all the elements that match the conditions defined by the specified predicate. | ||
RemoveAt(int)Removes the item at the specified index of the list. | ||
RemoveRange(int, int)Removes a range of elements from the list. | ||
Reverse()Reverses the order of the elements in the list. | ||
Reverse(int, int)Reverses the order of the elements in the specified element range of the list. | ||
Sort()Sorts the elements in the list using the default comparer. | ||
Sort(IComparer<T>)Sorts the elements in the list using the specified comparer. | ||
Sort(Comparison<T>)Sorts the elements in the list using the specified comparison. | ||
Sort(int, int, IComparer<T>)Sorts the elements in the list using the specified comparer. | ||
ToArray()Copies the elements in the list to a new array. | ||
TrimExcess()Suggests that the capacity be reduced to the actual number of elements in the list. | ||
TrueForAll(Predicate<T>)Determines whether every element in the List matches the conditions defined by the specified predicate. |