This documentation is archived and is not being maintained.

ListItemCollection Members

ListItemCollection overview

Public Constructors

public constructorListItemCollection Constructor Initializes a new instance of the ListItemCollection class.

Public Properties

public propertyCapacity Gets the or sets the maximum number of items that the ListItemCollection can store.
public propertyCount Gets the number of ListItem objects in the collection.
public propertyIsReadOnly Gets a value indicating whether the ListItemCollection is read-only.
public propertyIsSynchronized Gets a value indicating whether access to the ListItemCollection is synchronized (thread-safe).
public propertyItem Gets a ListItem at the specified index in the collection.

In C#, this property is the indexer for the ListItemCollection class.

public propertySyncRoot Gets the object that can be used to synchronize access to the ListItemCollection.

Public Methods

public methodAdd Overloaded. Appends a ListItem to the end of the collection.
public methodAddRange Adds the items in an array of ListItem objects to the collection.
public methodClear Removes all ListItem objects from the collection.
public methodContains Determines whether the collection contains the specified item.
public methodCopyTo Copies the items from the ListItemCollection to the specified System.Array, starting with the specified index.
public methodEquals (inherited from Object) Overloaded. Determines whether two Object instances are equal.
public methodFindByText Searches the collection for a ListItem with a Text property that contains the specified text.
public methodFindByValue Searches the collection for a ListItem with a Value property that contains the specified value.
public methodGetEnumerator Returns a System.Collections.IEnumerator implemented object that contains all ListItem objects in the ListItemCollection.
public methodGetHashCode (inherited from Object) Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
public methodGetType (inherited from Object) Gets the Type of the current instance.
public methodIndexOf Determines the index value that represents the position of the specified ListItem in the collection.
public methodInsert Overloaded. Inserts a ListItem in the collection at the specified index location.
public methodRemove Overloaded. Removes a ListItem from the collection.
public methodRemoveAt Removes the ListItem at the specified index from the collection.
public methodToString (inherited from Object) Returns a String that represents the current Object.

Protected Methods

protected methodFinalize (inherited from Object) Overridden. Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.

In C# and C++, finalizers are expressed using destructor syntax.

protected methodMemberwiseClone (inherited from Object) Creates a shallow copy of the current Object.

See Also

ListItemCollection Class | System.Web.UI.WebControls Namespace

Show: