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 具有固定的大小。

valuenull

備註

您可以藉由檢查 IsReadOnly 屬性來測試集合是否 SiteMapNodeCollection 為唯讀。

適用於

另請參閱