SiteMapNodeCollection.RemoveAt(Int32) 方法

定义

从集合中移除位于指定索引位置的 SiteMapNode 对象。Removes the SiteMapNode object at the specified index of the collection.

public:
 virtual void RemoveAt(int index);
public virtual void RemoveAt (int index);
abstract member RemoveAt : int -> unit
override this.RemoveAt : int -> unit
Public Overridable Sub RemoveAt (index As Integer)

参数

index
Int32

要移除的元素的从零开始的索引。The zero-based index of the element to remove.

例外

index 小于零。index is less than zero.

- 或 --or- index 大于 Countindex is greater than the Count.

SiteMapNodeCollection 为只读。The SiteMapNodeCollection is read-only.

- 或 --or- SiteMapNodeCollection 具有固定大小。The SiteMapNodeCollection has a fixed sized.

注解

可以 SiteMapNodeCollection 通过检查属性来测试集合是否为只读 IsReadOnlyYou can test whether a SiteMapNodeCollection collection is read-only by checking the IsReadOnly property.

若要 SiteMapNodeCollection 通过指定要删除的对象从中删除元素 SiteMapNode ,请使用 Remove 方法。To remove an element from the SiteMapNodeCollection by specifying a SiteMapNode object to remove, use the Remove method.

适用于

另请参阅