System.Collections Namespace
Namespace: System.Collections
Assembly: mscorlib.dll
Provides interfaces and classes that define various collections of objects, such as lists, queues, dictionaries, and sets.
Interfaces
-
ICollection<T>
Represents a strongly typed list of objects that can be accessed by index. The Count, Item, and IndexOf properties and Add, RemoveAt, Insert, and Remove methods are inherited from the IList interface.
public interface ICollection<T> : IEnumerable<T> -
IEnumerable<T>
Exposes an enumerator, in a generic manner, that can be used to iterate over a collection of a specific type.
public interface IEnumerable<T> : IEnumerable -
IDictionary<TKey, TValue>
Represents a collection of key/value pairs that are sorted either by key or by value.
public interface IDictionary<TKey, TValue> : ICollection<KeyValuePair<TKey, TValue>> -
IList<T>
Represents a strongly typed list of objects that can be accessed by index. The Count, Item, and IndexOf properties and Add, RemoveAt, Insert, and Remove methods are inherited from the IList interface.
public interface IList<T> : ICollection<T>
Classes
-
ArrayList
Represents a strongly typed list of objects that can be accessed by index. The Count, Item, and IndexOf properties and Add, RemoveAt, Insert, and Remove methods are inherited from the IList interface.
public class ArrayList : IList, ICollection, IEnumerable, object -
Dictionary<TKey, TValue>
Represents a collection of key/value pairs that are sorted either by key or by value.
public class Dictionary<TKey, TValue> : ICollection<KeyValuePair<TKey, TValue>>, IEnumerable<KeyValuePair<TKey, TValue>>, IDictionary<TKey, TValue>, IEnumerable, object -
List<T>
Represents a strongly typed list of objects that can be accessed by index. The Count, Item, and IndexOf properties and Add, RemoveAt, Insert, and Remove methods are inherited from the IList interface.
public class List<T> : IList<T>, ICollection<T>, IEnumerable<T>, IEnumerable, object -
Queue<T>
Represents a collection of objects that are the last in, first out (LIFO).
public class Queue<T> : ICollection<T>, IEnumerable<T>, IEnumerable, object -
Stack<T>
Represents a collection of objects that are the last in, first out (LIFO).
public class Stack<T> : ICollection<T>, IEnumerable<T>, IEnumerable, object