SiteMapNodeCollection.Item Property
.NET Framework 3.0
Gets or sets the SiteMapNode object at the specified index in the collection.
Namespace: System.Web
Assembly: System.Web (in system.web.dll)
Assembly: System.Web (in system.web.dll)
public: virtual property SiteMapNode^ default [int] { SiteMapNode^ get (int index); void set (int index, SiteMapNode^ value); }
/** @property */ public SiteMapNode get_Item (int index) /** @property */ public void set_Item (int index, SiteMapNode value)
Not applicable.
Parameters
- index
The index of the SiteMapNode to find.
Property Value
A SiteMapNode that represents an element in the SiteMapNodeCollection.| Exception type | Condition |
|---|---|
| The SiteMapNodeCollection is read-only. | |
| index is less than zero. - or - index is great than the Count. | |
| The value supplied to the setter is a null reference (Nothing in Visual Basic). |
The following code example demonstrates how to use the Item indexer to retrieve a SiteMapNode object from the SiteMapNodeCollection collection. In this example, a SiteMapNode object is removed from its position at the second element of the internal array using the Remove method and is appended to the array with the Add method. To insert a SiteMapNode object at a specific index, instead of appending it to the end of the array, use the Insert method.
Community Additions
ADD
Show: