ToolStripItemCollection.RemoveByKey Method (String)

 

Removes the item that has the specified key.

Namespace:   System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

public virtual void RemoveByKey(
	string key
)

Parameters

key
Type: System.String

The key of the ToolStripItem to remove.

Exception Condition
NotSupportedException

The ToolStripItemCollection is read-only.

The key parameter value corresponds to the ToolStripItem.Name property.

.NET Framework
Available since 2.0
Return to top
Show: