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);
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.

适用于