System.Web.UI.WebControls.ListItemCollection: Method Members

The methods of System.Web.UI.WebControls.ListItemCollection are listed below. For a list of all members, see the ListItemCollection Members list.

See Also: Inherited members from System.Object

Public Methods

Add(string)

Appends a System.Web.UI.WebControls.ListItem to the end of the collection that represents the specified string.

Add(ListItem)

Appends the specified System.Web.UI.WebControls.ListItem to the end of the collection.

AddRange(ListItem[])

Adds the items in an array of System.Web.UI.WebControls.ListItem objects to the collection.

Clear()

Removes all System.Web.UI.WebControls.ListItem objects from the collection.

Contains(ListItem) : bool

Determines whether the collection contains the specified item.

CopyTo(Array, int)

Copies the items from the System.Web.UI.WebControls.ListItemCollection to the specified Array, starting with the specified index.

FindByText(string) : ListItem

Searches the collection for a System.Web.UI.WebControls.ListItem with a ListItem.Text property that equals the specified text.

FindByValue(string) : ListItem

Searches the collection for a System.Web.UI.WebControls.ListItem with a ListItem.Value property that contains the specified value.

GetEnumerator() : IEnumerator

Returns a IEnumerator implemented object that contains all System.Web.UI.WebControls.ListItem objects in the System.Web.UI.WebControls.ListItemCollection.

IndexOf(ListItem) : int

Determines the index value that represents the position of the specified System.Web.UI.WebControls.ListItem in the collection.

Insert(int, string)

Inserts a System.Web.UI.WebControls.ListItem which represents the specified string in the collection at the specified index location.

Insert(int, ListItem)

Inserts the specified System.Web.UI.WebControls.ListItem in the collection at the specified index location.

Remove(string)

Removes a System.Web.UI.WebControls.ListItem from the collection that represents the specified string.

Remove(ListItem)

Removes the specified System.Web.UI.WebControls.ListItem from the collection.

RemoveAt(int)

Removes the System.Web.UI.WebControls.ListItem at the specified index from the collection.