ToolStripItemCollection.IndexOf(ToolStripItem) ToolStripItemCollection.IndexOf(ToolStripItem) ToolStripItemCollection.IndexOf(ToolStripItem) ToolStripItemCollection.IndexOf(ToolStripItem) Method

定义

检索集合中指定项的索引。Retrieves the index of the specified item in the collection.

public:
 int IndexOf(System::Windows::Forms::ToolStripItem ^ value);
public int IndexOf (System.Windows.Forms.ToolStripItem value);
member this.IndexOf : System.Windows.Forms.ToolStripItem -> int
Public Function IndexOf (value As ToolStripItem) As Integer

参数

返回

如果在 ToolStripItem 中找到指定的 ToolStripItemCollection,则为表示该项位置的从零开始的索引值;如果未找到,则为 -1。A zero-based index value that represents the position of the specified ToolStripItem in the ToolStripItemCollection, if found; otherwise, -1.

适用于