Share via


ToolStripItemCollection.IndexOf(ToolStripItem) 方法

定義

擷取集合中指定之項目的索引。

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

參數

value
ToolStripItem

要在 ToolStripItemCollection 中尋找的 ToolStripItem

傳回

Int32

如果找到的話,則為以零起始的索引值,表示指定之 ToolStripItemToolStripItemCollection 中的位置,否則為 -1。

適用於