SiteMapNodeCollection.Clear Method ()


The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

Removes all items from the collection.

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

public virtual void Clear()

Exception Condition

The SiteMapNodeCollection is read-only.

You can test whether a SiteMapNodeCollection collection is read-only by checking the IsReadOnly property.

To remove specific elements of the SiteMapNodeCollection, use the Remove or RemoveAt method.

.NET Framework
Available since 2.0
Return to top