StringValues.IList<String>.IndexOf(String) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
返回 StringValues 中某项的第一个匹配项的从零开始的索引。
virtual int System.Collections.Generic.IList<System.String>.IndexOf(System::String ^ item) = System::Collections::Generic::IList<System::String ^>::IndexOf;
int IList<string>.IndexOf (string item);
int IList<string>.IndexOf (string? item);
abstract member System.Collections.Generic.IList<System.String>.IndexOf : string -> int
override this.System.Collections.Generic.IList<System.String>.IndexOf : string -> int
Function IndexOf (item As String) As Integer Implements IList(Of String).IndexOf
参数
- item
- String
要在 StringValues 中定位的字符串。
返回
如果找到 StringValues 中 item
的第一个匹配项的从零开始的索引,则为该索引;否则为 -1。