ImmutableArray<T>.Builder.IndexOf 方法   
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
| IndexOf(T) | 确定数组中特定项的索引。 | 
| IndexOf(T, Int32) | 确定指定项的索引。 | 
| IndexOf(T, Int32, IEqualityComparer<T>) | 搜索指定项的数组。 | 
| IndexOf(T, Int32, Int32) | 确定指定项的索引。 | 
| IndexOf(T, Int32, Int32, IEqualityComparer<T>) | 确定指定项的索引。 | 
IndexOf(T)
- Source:
- ImmutableArray_1.Builder.cs
- Source:
- ImmutableArray_1.Builder.cs
- Source:
- ImmutableArray_1.Builder.cs
确定数组中特定项的索引。
public:
 virtual int IndexOf(T item);public int IndexOf (T item);abstract member IndexOf : 'T -> int
override this.IndexOf : 'T -> intPublic Function IndexOf (item As T) As Integer参数
- item
- T
要在数组中查找的项。
返回
如果在列表中找到,则为 item 的索引;否则为 -1。
实现
适用于
IndexOf(T, Int32)
- Source:
- ImmutableArray_1.Builder.cs
- Source:
- ImmutableArray_1.Builder.cs
- Source:
- ImmutableArray_1.Builder.cs
确定指定项的索引。
public:
 int IndexOf(T item, int startIndex);public int IndexOf (T item, int startIndex);member this.IndexOf : 'T * int -> intPublic Function IndexOf (item As T, startIndex As Integer) As Integer参数
- item
- T
要在数组中查找的项。
- startIndex
- Int32
搜索的起始位置。
返回
如果在列表中找到,则为 item 的索引;否则为 -1。
适用于
IndexOf(T, Int32, IEqualityComparer<T>)
- Source:
- ImmutableArray_1.Builder.cs
- Source:
- ImmutableArray_1.Builder.cs
- Source:
- ImmutableArray_1.Builder.cs
搜索指定项的数组。
public:
 int IndexOf(T item, int startIndex, System::Collections::Generic::IEqualityComparer<T> ^ equalityComparer);public int IndexOf (T item, int startIndex, System.Collections.Generic.IEqualityComparer<T>? equalityComparer);member this.IndexOf : 'T * int * System.Collections.Generic.IEqualityComparer<'T> -> intPublic Function IndexOf (item As T, startIndex As Integer, equalityComparer As IEqualityComparer(Of T)) As Integer参数
- item
- T
要搜索的项。
- startIndex
- Int32
在其处开始搜索的索引。
- equalityComparer
- IEqualityComparer<T>
要在搜索中使用的相等性比较器。
如果为 null,则使用 Default。
返回
在其中找到了项的数组的从 0 开始的索引;如果未找到该项,则为 -1。
适用于
IndexOf(T, Int32, Int32)
- Source:
- ImmutableArray_1.Builder.cs
- Source:
- ImmutableArray_1.Builder.cs
- Source:
- ImmutableArray_1.Builder.cs
确定指定项的索引。
public:
 int IndexOf(T item, int startIndex, int count);public int IndexOf (T item, int startIndex, int count);member this.IndexOf : 'T * int * int -> intPublic Function IndexOf (item As T, startIndex As Integer, count As Integer) As Integer参数
- item
- T
要在数组中查找的项。
- startIndex
- Int32
搜索的起始位置。
- count
- Int32
要搜索的元素数。
返回
如果在列表中找到,则为 item 的索引;否则为 -1。
适用于
IndexOf(T, Int32, Int32, IEqualityComparer<T>)
- Source:
- ImmutableArray_1.Builder.cs
- Source:
- ImmutableArray_1.Builder.cs
- Source:
- ImmutableArray_1.Builder.cs
确定指定项的索引。
public:
 int IndexOf(T item, int startIndex, int count, System::Collections::Generic::IEqualityComparer<T> ^ equalityComparer);public int IndexOf (T item, int startIndex, int count, System.Collections.Generic.IEqualityComparer<T> equalityComparer);public int IndexOf (T item, int startIndex, int count, System.Collections.Generic.IEqualityComparer<T>? equalityComparer);member this.IndexOf : 'T * int * int * System.Collections.Generic.IEqualityComparer<'T> -> intPublic Function IndexOf (item As T, startIndex As Integer, count As Integer, equalityComparer As IEqualityComparer(Of T)) As Integer参数
- item
- T
要在数组中查找的项。
- startIndex
- Int32
在其处开始搜索的索引。
- count
- Int32
搜索的起始位置。
- equalityComparer
- IEqualityComparer<T>
要在搜索中使用的相等性比较器。
返回
如果在列表中找到,则为 item 的索引;否则为 -1。