System.Windows.Forms.ToolStripItemCollection.RemoveAt Method

Removes an item from the specified index in the collection.

Syntax

public void RemoveAt (int index)

Parameters

index
The index value of the System.Windows.Forms.ToolStripItem to remove.

Remarks

When a System.Windows.Forms.ToolStripItem is removed from the System.Windows.Forms.ToolStripItemCollection, all subsequent controls are moved up one position in the collection.

You can also remove a System.Windows.Forms.ToolStripItem by using the ToolStripItemCollection.Remove(ToolStripItem) method, or remove all controls by using the ToolStripItemCollection.Clear method.

To add new System.Windows.Forms.ToolStripItem objects to the collection, use the ToolStripItemCollection.Add(ToolStripItem) or ToolStripItemCollection.AddRange(ToolStripItem[]) methods.

Requirements

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Assembly Versions: 2.0.0.0
Since: .NET 2.0