Collection Methods

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Include Protected Members
Include Inherited Members

Include Silverlight Members
Include Silverlight for Windows Phone Members
Include XNA Framework Members

The Collection type exposes the following members.

Methods

  Name Description
Public method Add Adds an element to a Collection object.
Public method Clear Deletes all elements of a Visual Basic Collection object.
Public method Contains Returns a Boolean value indicating whether a Visual Basic Collection object contains an element with a specific key.
Public method Equals(Object) Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
Public method GetEnumerator Returns a reference to an enumerator object, which is used to iterate over a Collection object.
Public method GetHashCode Serves as a hash function for a particular type. (Inherited from Object.)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method Remove(Int32) Removes an element from a Collection object.
Public method Remove(String) Removes an element from a Collection object.
Public method ToString Returns a string that represents the current object. (Inherited from Object.)

Top

Extension Methods

  Name Description
Public Extension Method AsQueryable Converts an IEnumerable to an IQueryable. (Defined by Queryable.)
Public Extension Method Cast<TResult> Converts the elements of an IEnumerable to the specified type. (Defined by Enumerable.)
Public Extension Method OfType<TResult> Filters the elements of an IEnumerable based on a specified type. (Defined by Enumerable.)

Top

Explicit Interface Implementations

  Name Description
Explicit interface implemetationPrivate method ICollection.CopyTo Copies the elements of the Collection to an Array, starting at a particular Array index. Implements the ICollection interface.
Explicit interface implemetationPrivate method IEnumerable.GetEnumerator Returns an enumerator that iterates through the collection. Implements the ICollection interface.
Explicit interface implemetationPrivate method IList.Add Adds an item to the Collection object. Implements the IList interface.
Explicit interface implemetationPrivate method IList.Clear Removes all items from the Collection object. Implements the IList interface.
Explicit interface implemetationPrivate method IList.Contains Determines whether the Collection object contains a specific value. Implements the IList interface.
Explicit interface implemetationPrivate method IList.IndexOf Determines the index of a specific item in the Collection object. Implements the IList interface.
Explicit interface implemetationPrivate method IList.Insert Inserts an item to the Collection object at the specified index. Implements the IList interface.
Explicit interface implemetationPrivate method IList.Remove Removes the first occurrence of a specific object from the Collection object. Implements the IList interface.
Explicit interface implemetationPrivate method IList.RemoveAt Removes the Collection object item at the specified index. Implements the IList interface.

Top