ToolStripItemCollection.Remove(ToolStripItem) 方法

定义

从集合中移除指定的项。Removes the specified item from the collection.

public:
 void Remove(System::Windows::Forms::ToolStripItem ^ value);
public void Remove (System.Windows.Forms.ToolStripItem value);
member this.Remove : System.Windows.Forms.ToolStripItem -> unit
Public Sub Remove (value As ToolStripItem)

参数

异常

注解

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

你还可以RemoveAt使用方法ToolStripItem删除, 或使用Clear方法删除所有控件。You can also remove a ToolStripItem by using the RemoveAt 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.

适用于