ListItemCollection::Clear Method ()

 

Removes all ListItem objects from the collection.

Namespace:   System.Web.UI.WebControls
Assembly:  System.Web (in System.Web.dll)

public:
virtual void Clear() sealed

Implements

IList::Clear()

Use the Clear method to remove all ListItem objects. The Count property is also set to 0.

System_CAPS_cautionCaution

When you use this method, all ListItem objects are removed from the collection. You cannot undo this.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 1.1
Return to top
Show: