TreeNodeCollection.IList.Insert(Int32, Object) 方法

定義

在樹狀節點集合中的指定位置插入現有樹狀節點。

 virtual void System.Collections.IList.Insert(int index, System::Object ^ node) = System::Collections::IList::Insert;
void IList.Insert (int index, object node);
void IList.Insert (int index, object? node);
abstract member System.Collections.IList.Insert : int * obj -> unit
override this.System.Collections.IList.Insert : int * obj -> unit
Sub Insert (index As Integer, node As Object) Implements IList.Insert

參數

index
Int32

集合中要插入樹狀節點的索引位置。

node
Object

要插入至集合的 TreeNode

實作

例外狀況

node 目前已指派給其他 TreeView

-或-

node 不是 TreeNode

備註

Sorted如果 屬性設定為 true ,則會 index 忽略 參數。 會 TreeNode 插入樹狀檢視,並 TreeView 再次排序 。

適用於