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

定義

將工具插入 ToolboxCategory 之指定的索引。Inserts a tool into the ToolboxCategory at the specified index.

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

參數

index
Int32

以零為基底的索引,這是應該插入 value 之處。The zero-based index at which value should be inserted.

value
Object

要加入至集合中的工具。The tool added to the collection.

實作

例外狀況

index 對於 ToolboxCategory 集合無效。The index is not valid for the ToolboxCategory collection.

valuenullThe value is null.

ToolboxCategory 是唯讀的,或者它具有已經超過的固定大小。The ToolboxCategory is read-only, or it has a fixed size that has been exceeded.

備註

ToolboxCategory 會實作 IList 介面。ToolboxCategory implements the IList interface.

如果 index 等於 IList 中的項目數目,則會將 value 附加至結尾。If index equals the number of items in the IList, then value is appended to the end.

在連續項目的集合 (例如清單) 中,後面接著插入點的項目會向下移動以容納新項目。In collections of contiguous elements, such as lists, the elements that follow the insertion point move down to accommodate the new element. 如果集合具有索引,則移動之項目的索引也會更新。If the collection is indexed, the indexes of the elements that are moved are also updated.

適用於