ToolStripItemCollection.RemoveAt(Int32) ToolStripItemCollection.RemoveAt(Int32) ToolStripItemCollection.RemoveAt(Int32) ToolStripItemCollection.RemoveAt(Int32) Method

定义

从集合中的指定索引处移除项。Removes an item from the specified index in the collection.

public:
 void RemoveAt(int index);
public void RemoveAt (int index);
member this.RemoveAt : int -> unit
Public Sub RemoveAt (index As Integer)

参数

index
Int32 Int32 Int32 Int32

要移除的 ToolStripItem 的索引值。The index value of the ToolStripItem to remove.

实现

异常

注解

从中移除时, 将在集合中的一个位置上移所有后续控件。 ToolStripItemCollection ToolStripItemWhen a ToolStripItem is removed from the ToolStripItemCollection, all subsequent controls are moved up one position in the collection.

你还可以Remove使用方法ToolStripItem删除, 或使用Clear方法删除所有控件。You can also remove a ToolStripItem by using the Remove method, or remove all controls by using the Clear method.

若要将ToolStripItem新对象添加到集合, 请Add使用AddRange或方法。To add new ToolStripItem objects to the collection, use the Add or AddRange methods.

适用于