System.Collections.Generic.ICollection<T>

Defines methods to manipulate generic collections.

See Also: ICollection<T> Members

Syntax

public interface ICollection<T> : IEnumerable<T>

Type Parameters

T
Documentation for this section has not yet been entered.

Remarks

The ICollection`1 interface is the base interface for classes in the System.Collections.Generic namespace.

The ICollection`1 interface extends IEnumerable`1; IDictionary`2 and IList`1 are more specialized interfaces that extend ICollection`1. A IDictionary`2 implementation is a collection of key/value pairs, like the Dictionary`2 class. A IList`1 implementation is a collection of values, and its members can be accessed by index, like the List`1 class.

If neither the IDictionary`2 interface nor the IList`1 interface meet the requirements of the required collection, derive the new collection class from the ICollection`1 interface instead for more flexibility.

Requirements

Namespace: System.Collections.Generic
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 2.0.0.0, 4.0.0.0
Since: .NET 2.0