MatchCollection.IList<Match>.IndexOf(Match) 方法

定義

決定集合中指定項目的索引。

 virtual int System.Collections.Generic.IList<System.Text.RegularExpressions.Match>.IndexOf(System::Text::RegularExpressions::Match ^ item) = System::Collections::Generic::IList<System::Text::RegularExpressions::Match ^>::IndexOf;
int IList<Match>.IndexOf (System.Text.RegularExpressions.Match item);
abstract member System.Collections.Generic.IList<System.Text.RegularExpressions.Match>.IndexOf : System.Text.RegularExpressions.Match -> int
override this.System.Collections.Generic.IList<System.Text.RegularExpressions.Match>.IndexOf : System.Text.RegularExpressions.Match -> int
Function IndexOf (item As Match) As Integer Implements IList(Of Match).IndexOf

參數

item
Match

要在集合中找出的物件。

傳回

如果可在清單中找到則為 item 的索引,否則為 -1。

實作

備註

如果物件在清單中多次出現,則 IndexOf 方法一定會傳回找到的第一個執行個體。

適用於