語言

SiteMapNodeCollection.Insert(Int32, SiteMapNode) 方法

定義

將指定的 SiteMapNode 物件插入集合中指定的索引。

public:
 virtual void Insert(int index, System::Web::SiteMapNode ^ value);
public virtual void Insert(int index, System.Web.SiteMapNode value);
abstract member Insert : int * System.Web.SiteMapNode -> unit
override this.Insert : int * System.Web.SiteMapNode -> unit
Public Overridable Sub Insert (index As Integer, value As SiteMapNode)

參數

index
Int32

即以零為基礎的索引,該索引被 SiteMapNode 插入。

value
SiteMapNode

SiteMapNode插入。

例外狀況

index 小於零。

-或-

index大於 。Count

這是 SiteMapNodeCollection 唯讀的。

-或-

它 SiteMapNodeCollection 有固定尺寸。

value 是 null。

備註

你可以透過檢查SiteMapNodeCollection該屬性來測試一個IsReadOnly集合是否為唯讀。

適用於

另請參閱