11 [DebuggerTypeProxy(typeof(Mscorlib_CollectionDebugView<>))]
12 [DebuggerDisplay(
"Count = {Count}")]
13 [__DynamicallyInvokable]
36 public T this[
int index]
54 internal SynchronizedList(
List<T> list)
60 public void Add(
T item)
80 return _list.Contains(item);
84 public void CopyTo(
T[] array,
int arrayIndex)
88 _list.CopyTo(array, arrayIndex);
96 return _list.Remove(item);
104 return _list.GetEnumerator();
120 return _list.IndexOf(item);
124 public void Insert(
int index,
T item)
128 _list.Insert(index, item);
136 _list.RemoveAt(index);
143 [__DynamicallyInvokable]
156 [__DynamicallyInvokable]
159 [__DynamicallyInvokable]
169 [__DynamicallyInvokable]
172 [__DynamicallyInvokable]
175 if (index == 0 || index == list._size + 1)
177 ThrowHelper.ThrowInvalidOperationException(ExceptionResource.InvalidOperation_EnumOpCantHappen);
187 version = list._version;
188 current =
default(T);
192 [__DynamicallyInvokable]
201 [__DynamicallyInvokable]
205 if (version == list._version && (uint)index < (uint)list._size)
207 current = list._items[index];
211 return MoveNextRare();
214 private bool MoveNextRare()
216 if (version != list._version)
218 ThrowHelper.ThrowInvalidOperationException(ExceptionResource.InvalidOperation_EnumFailedVersion);
220 index = list._size + 1;
221 current =
default(T);
227 [__DynamicallyInvokable]
230 if (version != list._version)
232 ThrowHelper.ThrowInvalidOperationException(ExceptionResource.InvalidOperation_EnumFailedVersion);
235 current =
default(
T);
239 private const int _defaultCapacity = 4;
245 private int _version;
248 private object _syncRoot;
250 private static readonly
T[] _emptyArray =
new T[0];
257 [__DynamicallyInvokable]
260 [__DynamicallyInvokable]
263 return _items.Length;
265 [__DynamicallyInvokable]
270 ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.value, ExceptionResource.ArgumentOutOfRange_SmallCapacity);
272 if (value == _items.Length)
278 T[] array =
new T[value];
287 _items = _emptyArray;
294 [__DynamicallyInvokable]
297 [__DynamicallyInvokable]
307 [__DynamicallyInvokable]
308 bool IList.IsFixedSize
310 [__DynamicallyInvokable]
320 [__DynamicallyInvokable]
323 [__DynamicallyInvokable]
333 [__DynamicallyInvokable]
334 bool IList.IsReadOnly
336 [__DynamicallyInvokable]
346 [__DynamicallyInvokable]
347 bool ICollection.IsSynchronized
349 [__DynamicallyInvokable]
358 [__DynamicallyInvokable]
359 object ICollection.SyncRoot
361 [__DynamicallyInvokable]
364 if (_syncRoot ==
null)
378 [__DynamicallyInvokable]
379 public T this[
int index]
381 [__DynamicallyInvokable]
384 if ((uint)index >= (uint)_size)
386 ThrowHelper.ThrowArgumentOutOfRangeException();
388 return _items[index];
390 [__DynamicallyInvokable]
393 if ((uint)index >= (uint)_size)
395 ThrowHelper.ThrowArgumentOutOfRangeException();
397 _items[index] = value;
408 [__DynamicallyInvokable]
409 object IList.this[
int index]
411 [__DynamicallyInvokable]
416 [__DynamicallyInvokable]
419 ThrowHelper.IfNullAndNullsAreIllegalThenThrow<
T>(value, ExceptionArgument.value);
422 this[index] = (
T)value;
426 ThrowHelper.ThrowWrongValueTypeArgumentException(value, typeof(T));
432 [__DynamicallyInvokable]
435 _items = _emptyArray;
442 [__DynamicallyInvokable]
447 ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.capacity, ExceptionResource.ArgumentOutOfRange_NeedNonNegNum);
451 _items = _emptyArray;
455 _items =
new T[capacity];
463 [__DynamicallyInvokable]
466 if (collection ==
null)
468 ThrowHelper.ThrowArgumentNullException(ExceptionArgument.collection);
471 if (collection2 !=
null)
473 int count = collection2.
Count;
476 _items = _emptyArray;
479 _items =
new T[count];
480 collection2.
CopyTo(_items, 0);
486 _items = _emptyArray;
487 foreach (
T item
in collection)
494 private static bool IsCompatibleObject(
object value)
500 return default(T) ==
null;
509 [__DynamicallyInvokable]
512 if (_size == _items.Length)
514 EnsureCapacity(_size + 1);
516 _items[_size++] = item;
525 [__DynamicallyInvokable]
528 ThrowHelper.IfNullAndNullsAreIllegalThenThrow<
T>(item, ExceptionArgument.item);
535 ThrowHelper.ThrowWrongValueTypeArgumentException(item, typeof(T));
544 [__DynamicallyInvokable]
552 [__DynamicallyInvokable]
571 [__DynamicallyInvokable]
576 ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.index, ExceptionResource.ArgumentOutOfRange_NeedNonNegNum);
580 ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.count, ExceptionResource.ArgumentOutOfRange_NeedNonNegNum);
582 if (_size - index < count)
584 ThrowHelper.ThrowArgumentException(ExceptionResource.Argument_InvalidOffLen);
593 [__DynamicallyInvokable]
606 [__DynamicallyInvokable]
613 [__DynamicallyInvokable]
628 [__DynamicallyInvokable]
633 for (
int i = 0; i < _size; i++)
635 if (_items[i] ==
null)
643 for (
int j = 0; j < _size; j++)
645 if (@
default.Equals(_items[j], item))
657 [__DynamicallyInvokable]
660 if (IsCompatibleObject(item))
675 if (converter ==
null)
677 ThrowHelper.ThrowArgumentNullException(ExceptionArgument.converter);
680 for (
int i = 0; i < _size; i++)
682 list._items[i] = converter(_items[i]);
693 [__DynamicallyInvokable]
709 [__DynamicallyInvokable]
712 if (array !=
null && array.Rank != 1)
714 ThrowHelper.ThrowArgumentException(ExceptionResource.Arg_RankMultiDimNotSupported);
718 Array.
Copy(_items, 0, array, arrayIndex, _size);
722 ThrowHelper.ThrowArgumentException(ExceptionResource.Argument_InvalidArrayType);
739 [__DynamicallyInvokable]
740 public void CopyTo(
int index, T[] array,
int arrayIndex,
int count)
742 if (_size - index < count)
744 ThrowHelper.ThrowArgumentException(ExceptionResource.Argument_InvalidOffLen);
746 Array.
Copy(_items, index, array, arrayIndex, count);
757 [__DynamicallyInvokable]
758 public void CopyTo(T[] array,
int arrayIndex)
760 Array.
Copy(_items, 0, array, arrayIndex, _size);
763 private void EnsureCapacity(
int min)
765 if (_items.Length < min)
767 int num = (_items.Length == 0) ? 4 : (_items.Length * 2);
768 if ((uint)num > 2146435071u)
786 [__DynamicallyInvokable]
797 [__DynamicallyInvokable]
802 ThrowHelper.ThrowArgumentNullException(ExceptionArgument.match);
804 for (
int i = 0; i < _size; i++)
806 if (match(_items[i]))
819 [__DynamicallyInvokable]
824 ThrowHelper.ThrowArgumentNullException(ExceptionArgument.match);
827 for (
int i = 0; i < _size; i++)
829 if (match(_items[i]))
842 [__DynamicallyInvokable]
856 [__DynamicallyInvokable]
857 public int FindIndex(
int startIndex, Predicate<T> match)
859 return FindIndex(startIndex, _size - startIndex, match);
873 [__DynamicallyInvokable]
874 public int FindIndex(
int startIndex,
int count, Predicate<T> match)
876 if ((uint)startIndex > (uint)_size)
878 ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.startIndex, ExceptionResource.ArgumentOutOfRange_Index);
880 if (count < 0 || startIndex > _size - count)
882 ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.count, ExceptionResource.ArgumentOutOfRange_Count);
886 ThrowHelper.ThrowArgumentNullException(ExceptionArgument.match);
888 int num = startIndex + count;
889 for (
int i = startIndex; i < num; i++)
891 if (match(_items[i]))
904 [__DynamicallyInvokable]
909 ThrowHelper.ThrowArgumentNullException(ExceptionArgument.match);
911 for (
int num = _size - 1; num >= 0; num--)
913 if (match(_items[num]))
926 [__DynamicallyInvokable]
940 [__DynamicallyInvokable]
957 [__DynamicallyInvokable]
962 ThrowHelper.ThrowArgumentNullException(ExceptionArgument.match);
966 if (startIndex != -1)
968 ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.startIndex, ExceptionResource.ArgumentOutOfRange_Index);
971 else if ((uint)startIndex >= (uint)_size)
973 ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.startIndex, ExceptionResource.ArgumentOutOfRange_Index);
975 if (count < 0 || startIndex - count + 1 < 0)
977 ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.count, ExceptionResource.ArgumentOutOfRange_Count);
979 int num = startIndex - count;
980 for (
int num2 = startIndex; num2 > num; num2--)
982 if (match(_items[num2]))
995 [__DynamicallyInvokable]
1000 ThrowHelper.ThrowArgumentNullException(ExceptionArgument.match);
1002 int version = _version;
1003 for (
int i = 0; i < _size; i++)
1005 if (version != _version && BinaryCompatibility.TargetsAtLeast_Desktop_V4_5)
1011 if (version != _version && BinaryCompatibility.TargetsAtLeast_Desktop_V4_5)
1013 ThrowHelper.ThrowInvalidOperationException(ExceptionResource.InvalidOperation_EnumFailedVersion);
1019 [__DynamicallyInvokable]
1022 return new Enumerator(
this);
1027 [__DynamicallyInvokable]
1030 return new Enumerator(
this);
1035 [__DynamicallyInvokable]
1038 return new Enumerator(
this);
1050 [__DynamicallyInvokable]
1055 ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.index, ExceptionResource.ArgumentOutOfRange_NeedNonNegNum);
1059 ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.count, ExceptionResource.ArgumentOutOfRange_NeedNonNegNum);
1061 if (_size - index < count)
1063 ThrowHelper.ThrowArgumentException(ExceptionResource.Argument_InvalidOffLen);
1066 Array.
Copy(_items, index, list._items, 0, count);
1074 [__DynamicallyInvokable]
1077 return Array.IndexOf(_items, item, 0, _size);
1085 [__DynamicallyInvokable]
1088 if (IsCompatibleObject(item))
1101 [__DynamicallyInvokable]
1106 ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.index, ExceptionResource.ArgumentOutOfRange_Index);
1108 return Array.IndexOf(_items, item, index, _size - index);
1120 [__DynamicallyInvokable]
1125 ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.index, ExceptionResource.ArgumentOutOfRange_Index);
1127 if (count < 0 || index > _size - count)
1129 ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.count, ExceptionResource.ArgumentOutOfRange_Count);
1131 return Array.IndexOf(_items, item, index, count);
1140 [__DynamicallyInvokable]
1143 if ((uint)index > (uint)_size)
1145 ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.index, ExceptionResource.ArgumentOutOfRange_ListInsert);
1147 if (_size == _items.Length)
1149 EnsureCapacity(_size + 1);
1153 Array.
Copy(_items, index, _items, index + 1, _size - index);
1155 _items[index] = item;
1167 [__DynamicallyInvokable]
1170 ThrowHelper.IfNullAndNullsAreIllegalThenThrow<
T>(item, ExceptionArgument.item);
1177 ThrowHelper.ThrowWrongValueTypeArgumentException(item, typeof(T));
1189 [__DynamicallyInvokable]
1192 if (collection ==
null)
1194 ThrowHelper.ThrowArgumentNullException(ExceptionArgument.collection);
1196 if ((uint)index > (uint)_size)
1198 ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.index, ExceptionResource.ArgumentOutOfRange_Index);
1201 if (collection2 !=
null)
1203 int count = collection2.
Count;
1206 EnsureCapacity(_size + count);
1209 Array.
Copy(_items, index, _items, index + count, _size - index);
1211 if (
this == collection2)
1213 Array.
Copy(_items, 0, _items, index, index);
1214 Array.
Copy(_items, index + count, _items, index * 2, _size - index);
1218 T[] array =
new T[count];
1219 collection2.
CopyTo(array, 0);
1220 array.CopyTo(_items, index);
1229 while (enumerator.MoveNext())
1241 [__DynamicallyInvokable]
1257 [__DynamicallyInvokable]
1262 ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.index, ExceptionResource.ArgumentOutOfRange_Index);
1276 [__DynamicallyInvokable]
1279 if (
Count != 0 && index < 0)
1281 ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.index, ExceptionResource.ArgumentOutOfRange_NeedNonNegNum);
1283 if (
Count != 0 && count < 0)
1285 ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.count, ExceptionResource.ArgumentOutOfRange_NeedNonNegNum);
1293 ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.index, ExceptionResource.ArgumentOutOfRange_BiggerThanCollection);
1295 if (count > index + 1)
1297 ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.count, ExceptionResource.ArgumentOutOfRange_BiggerThanCollection);
1306 [__DynamicallyInvokable]
1322 [__DynamicallyInvokable]
1325 if (IsCompatibleObject(item))
1336 [__DynamicallyInvokable]
1341 ThrowHelper.ThrowArgumentNullException(ExceptionArgument.match);
1344 for (i = 0; i < _size && !match(_items[i]); i++)
1354 for (; j < _size && match(_items[j]); j++)
1359 _items[i++] = _items[j++];
1363 int result = _size - i;
1374 [__DynamicallyInvokable]
1377 if ((uint)index >= (uint)_size)
1379 ThrowHelper.ThrowArgumentOutOfRangeException();
1384 Array.
Copy(_items, index + 1, _items, index, _size - index);
1386 _items[_size] =
default(
T);
1398 [__DynamicallyInvokable]
1403 ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.index, ExceptionResource.ArgumentOutOfRange_NeedNonNegNum);
1407 ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.count, ExceptionResource.ArgumentOutOfRange_NeedNonNegNum);
1409 if (_size - index < count)
1411 ThrowHelper.ThrowArgumentException(ExceptionResource.Argument_InvalidOffLen);
1419 Array.
Copy(_items, index + count, _items, index, _size - index);
1427 [__DynamicallyInvokable]
1441 [__DynamicallyInvokable]
1446 ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.index, ExceptionResource.ArgumentOutOfRange_NeedNonNegNum);
1450 ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.count, ExceptionResource.ArgumentOutOfRange_NeedNonNegNum);
1452 if (_size - index < count)
1454 ThrowHelper.ThrowArgumentException(ExceptionResource.Argument_InvalidOffLen);
1462 [__DynamicallyInvokable]
1473 [__DynamicallyInvokable]
1490 [__DynamicallyInvokable]
1495 ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.index, ExceptionResource.ArgumentOutOfRange_NeedNonNegNum);
1499 ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.count, ExceptionResource.ArgumentOutOfRange_NeedNonNegNum);
1501 if (_size - index < count)
1503 ThrowHelper.ThrowArgumentException(ExceptionResource.Argument_InvalidOffLen);
1505 Array.
Sort(_items, index, count, comparer);
1514 [__DynamicallyInvokable]
1515 public void Sort(Comparison<T> comparison)
1517 if (comparison ==
null)
1519 ThrowHelper.ThrowArgumentNullException(ExceptionArgument.match);
1530 [__DynamicallyInvokable]
1533 T[] array =
new T[_size];
1539 [__DynamicallyInvokable]
1542 int num = (int)((
double)_items.Length * 0.9);
1555 [__DynamicallyInvokable]
1560 ThrowHelper.ThrowArgumentNullException(ExceptionArgument.match);
1562 for (
int i = 0; i < _size; i++)
1564 if (!match(_items[i]))
1574 return new SynchronizedList(list);
int LastIndexOf(T item, int index)
Searches for the specified object and returns the zero-based index of the last occurrence within the ...
Provides a base class for implementations of the T:System.Collections.Generic.IEqualityComparer`1 gen...
void Reset()
Sets the enumerator to its initial position, which is before the first element in the collection.
List(int capacity)
Initializes a new instance of the T:System.Collections.Generic.List`1 class that is empty and has the...
int BinarySearch(T item, IComparer< T > comparer)
Searches the entire sorted T:System.Collections.Generic.List`1 for an element using the specified com...
bool MoveNext()
Advances the enumerator to the next element of the T:System.Collections.Generic.List`1.
int Count
Gets the number of elements contained in the T:System.Collections.Generic.List`1.
Provides the base class for a generic read-only collection.
void RemoveAt(int index)
Removes the element at the specified index of the T:System.Collections.Generic.List`1.
static void Clear(Array array, int index, int length)
Sets a range of elements in an array to the default value of each element type.
List(IEnumerable< T > collection)
Initializes a new instance of the T:System.Collections.Generic.List`1 class that contains elements co...
int IndexOf(T item, int index)
Searches for the specified object and returns the zero-based index of the first occurrence within the...
void InsertRange(int index, IEnumerable< T > collection)
Inserts the elements of a collection into the T:System.Collections.Generic.List`1 at the specified in...
ReadOnlyCollection< T > AsReadOnly()
Returns a read-only T:System.Collections.ObjectModel.ReadOnlyCollection`1 wrapper for the current col...
List< TOutput > ConvertAll< TOutput >(Converter< T, TOutput > converter)
Converts the elements in the current T:System.Collections.Generic.List`1 to another type,...
Provides a mechanism for releasing unmanaged resources.To browse the .NET Framework source code for t...
int FindIndex(int startIndex, int count, Predicate< T > match)
Searches for an element that matches the conditions defined by the specified predicate,...
static void Reverse(Array array)
Reverses the sequence of the elements in the entire one-dimensional T:System.Array.
bool TrueForAll(Predicate< T > match)
Determines whether every element in the T:System.Collections.Generic.List`1 matches the conditions de...
new IEnumerator< T > GetEnumerator()
Returns an enumerator that iterates through the collection.
The exception that is thrown for invalid casting or explicit conversion.
int BinarySearch(int index, int count, T item, IComparer< T > comparer)
Searches a range of elements in the sorted T:System.Collections.Generic.List`1 for an element using t...
List()
Initializes a new instance of the T:System.Collections.Generic.List`1 class that is empty and has the...
bool Remove(T item)
Removes the first occurrence of a specific object from the T:System.Collections.Generic....
int FindLastIndex(int startIndex, Predicate< T > match)
Searches for an element that matches the conditions defined by the specified predicate,...
Exposes the enumerator, which supports a simple iteration over a collection of a specified type....
Represents a strongly-typed, read-only collection of elements.
Represents a read-only collection of elements that can be accessed by index.
void CopyTo(T[] array, int arrayIndex)
Copies the elements of the T:System.Collections.Generic.ICollection`1 to an T:System....
void Insert(int index, T item)
Inserts an item to the T:System.Collections.Generic.IList`1 at the specified index.
int FindLastIndex(Predicate< T > match)
Searches for an element that matches the conditions defined by the specified predicate,...
static EqualityComparer< T > Default
Returns a default equality comparer for the type specified by the generic argument.
Supports a simple iteration over a generic collection.
Defines methods to manipulate generic collections.
int FindIndex(Predicate< T > match)
Searches for an element that matches the conditions defined by the specified predicate,...
void Sort(Comparison< T > comparison)
Sorts the elements in the entire T:System.Collections.Generic.List`1 using the specified T:System....
int IndexOf(T item, int index, int count)
Searches for the specified object and returns the zero-based index of the first occurrence within the...
void Add(T item)
Adds an object to the end of the T:System.Collections.Generic.List`1.
Exposes an enumerator, which supports a simple iteration over a non-generic collection....
T FindLast(Predicate< T > match)
Searches for an element that matches the conditions defined by the specified predicate,...
static void Sort(Array array)
Sorts the elements in an entire one-dimensional T:System.Array using the T:System....
Enumerator GetEnumerator()
Returns an enumerator that iterates through the T:System.Collections.Generic.List`1.
void Insert(int index, T item)
Inserts an element into the T:System.Collections.Generic.List`1 at the specified index.
bool Contains(T item)
Determines whether the T:System.Collections.Generic.ICollection`1 contains a specific value.
static int CompareExchange(ref int location1, int value, int comparand)
Compares two 32-bit signed integers for equality and, if they are equal, replaces the first value.
The exception that is thrown when an attempt is made to store an element of the wrong type within an ...
void Sort(IComparer< T > comparer)
Sorts the elements in the entire T:System.Collections.Generic.List`1 using the specified comparer.
bool IsReadOnly
Gets a value indicating whether the T:System.Collections.Generic.ICollection`1 is read-only.
List< T > GetRange(int index, int count)
Creates a shallow copy of a range of elements in the source T:System.Collections.Generic....
T Find(Predicate< T > match)
Searches for an element that matches the conditions defined by the specified predicate,...
List< T > FindAll(Predicate< T > match)
Retrieves all the elements that match the conditions defined by the specified predicate.
void Dispose()
Releases all resources used by the T:System.Collections.Generic.List`1.Enumerator.
void Sort()
Sorts the elements in the entire T:System.Collections.Generic.List`1 using the default comparer.
Provides methods for creating, manipulating, searching, and sorting arrays, thereby serving as the ba...
int FindIndex(int startIndex, Predicate< T > match)
Searches for an element that matches the conditions defined by the specified predicate,...
void Sort(int index, int count, IComparer< T > comparer)
Sorts the elements in a range of elements in T:System.Collections.Generic.List`1 using the specified ...
new T Current
Gets the element in the collection at the current position of the enumerator.
int IndexOf(T item)
Determines the index of a specific item in the T:System.Collections.Generic.IList`1.
bool Contains(T item)
Determines whether an element is in the T:System.Collections.Generic.List`1.
void AddRange(IEnumerable< T > collection)
Adds the elements of the specified collection to the end of the T:System.Collections....
static int BinarySearch(Array array, object value)
Searches an entire one-dimensional sorted array for a specific element, using the T:System....
IEnumerator GetEnumerator()
Returns an enumerator that iterates through a collection.
int LastIndexOf(T item, int index, int count)
Searches for the specified object and returns the zero-based index of the last occurrence within the ...
bool Exists(Predicate< T > match)
Determines whether the T:System.Collections.Generic.List`1 contains elements that match the condition...
int BinarySearch(T item)
Searches the entire sorted T:System.Collections.Generic.List`1 for an element using the default compa...
Enumerates the elements of a T:System.Collections.Generic.List`1.
void CopyTo(T[] array, int arrayIndex)
Copies the entire T:System.Collections.Generic.List`1 to a compatible one-dimensional array,...
Represents a collection of objects that can be individually accessed by index.
static void Copy(Array sourceArray, Array destinationArray, int length)
Copies a range of elements from an T:System.Array starting at the first element and pastes them into ...
void Reverse()
Reverses the order of the elements in the entire T:System.Collections.Generic.List`1.
void Clear()
Removes all elements from the T:System.Collections.Generic.List`1.
Represents a strongly typed list of objects that can be accessed by index. Provides methods to search...
void RemoveRange(int index, int count)
Removes a range of elements from the T:System.Collections.Generic.List`1.
int IndexOf(T item)
Searches for the specified object and returns the zero-based index of the first occurrence within the...
int Capacity
Gets or sets the total number of elements the internal data structure can hold without resizing.
void Reverse(int index, int count)
Reverses the order of the elements in the specified range.
Specifies that the class can be serialized.
void TrimExcess()
Sets the capacity to the actual number of elements in the T:System.Collections.Generic....
int RemoveAll(Predicate< T > match)
Removes all the elements that match the conditions defined by the specified predicate.
static int LastIndexOf(Array array, object value)
Searches for the specified object and returns the index of the last occurrence within the entire one-...
void CopyTo(int index, T[] array, int arrayIndex, int count)
Copies a range of elements from the T:System.Collections.Generic.List`1 to a compatible one-dimension...
int Count
Gets the number of elements contained in the T:System.Collections.ICollection.
T Current
Gets the element at the current position of the enumerator.
void CopyTo(Array array, int index)
Copies the elements of the T:System.Collections.ICollection to an T:System.Array, starting at a parti...
T [] ToArray()
Copies the elements of the T:System.Collections.Generic.List`1 to a new array.
int FindLastIndex(int startIndex, int count, Predicate< T > match)
Searches for an element that matches the conditions defined by the specified predicate,...
Provides atomic operations for variables that are shared by multiple threads.
int LastIndexOf(T item)
Searches for the specified object and returns the zero-based index of the last occurrence within the ...
Supports a simple iteration over a non-generic collection.
void CopyTo(T[] array)
Copies the entire T:System.Collections.Generic.List`1 to a compatible one-dimensional array,...
void Add(T item)
Adds an item to the T:System.Collections.Generic.ICollection`1.
void ForEach(Action< T > action)
Performs the specified action on each element of the T:System.Collections.Generic....
bool Remove(T item)
Removes the first occurrence of a specific object from the T:System.Collections.Generic....