Click or drag to resize
CollectionT Class
Provides the base class for a generic collection.
Inheritance Hierarchy
SystemObject
  System.Collections.ObjectModelCollectionT
    System.Collections.ObjectModelObservableCollectionT

Namespace: System.Collections.ObjectModel
Assembly: mscorlib (in mscorlib.dll) Version: 4.0.0.0
Syntax
C#
[SerializableAttribute]
public class Collection<T> : IList<T>, 
	ICollection<T>, IEnumerable<T>, IList, ICollection, IEnumerable

Type Parameters

T
The type of elements in the collection.

The CollectionT type exposes the following members.

Methods
  NameDescription
Public methodAdd
Adds an object to the end of the CollectionT.
Public methodClear
Removes all elements from the CollectionT.
Protected methodClearItems
Removes all elements from the CollectionT.
Public methodContains
Determines whether an element is in the CollectionT.
Public methodCopyTo
Copies the entire CollectionT to a compatible one-dimensional Array, starting at the specified index of the target array.
Public methodEquals(Object)
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Public methodGetEnumerator
Returns an enumerator that iterates through the CollectionT.
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodIndexOf
Searches for the specified object and returns the zero-based index of the first occurrence within the entire CollectionT.
Public methodInsert
Inserts an element into the CollectionT at the specified index.
Protected methodInsertItem
Inserts an element into the CollectionT at the specified index.
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodRemove
Removes the first occurrence of a specific object from the CollectionT.
Public methodRemoveAt
Removes the element at the specified index of the CollectionT.
Protected methodRemoveItem
Removes the element at the specified index of the CollectionT.
Protected methodSetItem
Replaces the element at the specified index.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Properties
  NameDescription
Public propertyCount
Gets the number of elements actually contained in the CollectionT.
Top
See Also