class List<T>

in global :: System . Collections . Generic

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.

public List<T>( int capacity )

Initializes a new instance of the class that is empty and has the specified initial capacity.

  • capacity The number of elements that the new list can initially store.

public int Capacity { get; set; }

Gets or sets the total number of elements the internal data structure can hold without resizing.

  • Returns The number of elements that the can contain before resizing is required.

public int Count { get; }

Gets the number of elements contained in the .

  • Returns The number of elements contained in the .

public List<T> GetRange( int index, int count )

Creates a shallow copy of a range of elements in the source .

  • index The zero-based index at which the range starts.
  • count The number of elements in the range.
  • Returns A shallow copy of a range of elements in the source .

public void RemoveAt( int index )

Removes the element at the specified index of the .

  • index The zero-based index of the element to remove.

public void RemoveRange( int index, int count )

Removes a range of elements from the .

  • index The zero-based starting index of the range of elements to remove.
  • count The number of elements to remove.

public void Reverse( int index, int count )

Reverses the order of the elements in the specified range.

  • index The zero-based starting index of the range to reverse.
  • count The number of elements in the range to reverse.

public int IndexOf( T item, int index )

😔 No documentation found.

public void Insert( int index, T item )

😔 No documentation found.

public void InsertRange( int index, IEnumerable<T> collection )

😔 No documentation found.

public int LastIndexOf( T item )

😔 No documentation found.

public int LastIndexOf( T item, int index )

😔 No documentation found.

public int LastIndexOf( T item, int index, int count )

😔 No documentation found.

public bool Remove( T item )

😔 No documentation found.

public int RemoveAll( Predicate<T> match )

😔 No documentation found.

public void Reverse( )

😔 No documentation found.

public void Sort( )

😔 No documentation found.

public void Sort( IComparer<T> comparer )

😔 No documentation found.

public void Sort( int index, int count, IComparer<T> comparer )

😔 No documentation found.

public void Sort( Comparison<T> comparison )

😔 No documentation found.

public T[] ToArray( )

😔 No documentation found.

public void TrimExcess( )

😔 No documentation found.

public bool TrueForAll( Predicate<T> match )

😔 No documentation found.

public Type GetType( )

😔 No documentation found.

public string ToString( )

😔 No documentation found.

public bool Equals( object obj )

😔 No documentation found.

public int GetHashCode( )

😔 No documentation found.

public List<T>( )

😔 No documentation found.

public int IndexOf( T item, int index, int count )

😔 No documentation found.

public List<T>( IEnumerable<T> collection )

😔 No documentation found.

public int IndexOf( T item )

😔 No documentation found.

public void AddRange( IEnumerable<T> collection )

😔 No documentation found.

public ReadOnlyCollection<T> AsReadOnly( )

😔 No documentation found.

public int BinarySearch( int index, int count, T item, IComparer<T> comparer )

😔 No documentation found.

public int BinarySearch( T item )

😔 No documentation found.

public int BinarySearch( T item, IComparer<T> comparer )

😔 No documentation found.

public void Clear( )

😔 No documentation found.

public bool Contains( T item )

😔 No documentation found.

public List<TOutput> ConvertAll( Converter<T,TOutput> converter )

😔 No documentation found.

public void CopyTo( T[] array )

😔 No documentation found.

public void CopyTo( int index, T[] array, int arrayIndex, int count )

😔 No documentation found.

public void CopyTo( T[] array, int arrayIndex )

😔 No documentation found.

public int EnsureCapacity( int capacity )

😔 No documentation found.

public void Add( T item )

😔 No documentation found.

public bool Exists( Predicate<T> match )

😔 No documentation found.

public List<T> FindAll( Predicate<T> match )

😔 No documentation found.

public int FindIndex( Predicate<T> match )

😔 No documentation found.

public int FindIndex( int startIndex, Predicate<T> match )

😔 No documentation found.

public int FindIndex( int startIndex, int count, Predicate<T> match )

😔 No documentation found.

public T FindLast( Predicate<T> match )

😔 No documentation found.

public int FindLastIndex( Predicate<T> match )

😔 No documentation found.

public int FindLastIndex( int startIndex, Predicate<T> match )

😔 No documentation found.

public int FindLastIndex( int startIndex, int count, Predicate<T> match )

😔 No documentation found.

public void ForEach( Action<T> action )

😔 No documentation found.

public List<T>.Enumerator GetEnumerator( )

😔 No documentation found.

public T Item { get; set; }

😔 No documentation found.

public T Find( Predicate<T> match )

😔 No documentation found.

public List<T> Slice( int start, int length )

😔 No documentation found.