ImmutableList<T>.Builder.IndexOf 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
| 名称 | 说明 |
|---|---|
| IndexOf(T) |
搜索指定的对象,并返回不可变列表中元素范围内的第一个匹配项的从零开始的索引。 |
| IndexOf(T, Int32) |
搜索指定的对象,并返回从指定索引扩展到最后一个元素的不可变列表中的元素范围内的第一个匹配项的从零开始的索引。 |
| IndexOf(T, Int32, Int32) |
搜索指定的对象,并返回从指定索引开始且包含指定数量的元素的不可变列表中第一个匹配项的从零开始的索引。 |
| IndexOf(T, Int32, Int32, IEqualityComparer<T>) |
搜索指定的对象,并返回从指定索引开始的元素 ImmutableList<T>.Builder 范围内第一个匹配项的从零开始的索引,并包含指定的元素数。 |
IndexOf(T)
- Source:
- ImmutableList_1.Builder.cs
- Source:
- ImmutableList_1.Builder.cs
- Source:
- ImmutableList_1.Builder.cs
- Source:
- ImmutableList_1.Builder.cs
- Source:
- ImmutableList_1.Builder.cs
- Source:
- ImmutableList_1.Builder.cs
搜索指定的对象,并返回不可变列表中元素范围内的第一个匹配项的从零开始的索引。
public:
virtual int IndexOf(T item);
public int IndexOf(T item);
abstract member IndexOf : 'T -> int
override this.IndexOf : 'T -> int
Public Function IndexOf (item As T) As Integer
参数
- item
- T
要定位在不可变列表中的对象。 该值可以 null 用于引用类型。
返回
如果找到,则为不可变列表中元素范围内的第一个匹配 item 项的从零开始的索引;否则为 -1。
实现
适用于
IndexOf(T, Int32)
- Source:
- ImmutableList_1.Builder.cs
- Source:
- ImmutableList_1.Builder.cs
- Source:
- ImmutableList_1.Builder.cs
- Source:
- ImmutableList_1.Builder.cs
- Source:
- ImmutableList_1.Builder.cs
- Source:
- ImmutableList_1.Builder.cs
搜索指定的对象,并返回从指定索引扩展到最后一个元素的不可变列表中的元素范围内的第一个匹配项的从零开始的索引。
public:
int IndexOf(T item, int index);
public int IndexOf(T item, int index);
member this.IndexOf : 'T * int -> int
Public Function IndexOf (item As T, index As Integer) As Integer
参数
- item
- T
要定位在不可变列表中的对象。 该值可以 null 用于引用类型。
- index
- Int32
从零开始的搜索索引。 0 (零)在空列表中有效。
返回
从不可变列表中 index 元素范围中项的第一个匹配项的从零开始的索引(如果找到);否则为 -1。
适用于
IndexOf(T, Int32, Int32)
- Source:
- ImmutableList_1.Builder.cs
- Source:
- ImmutableList_1.Builder.cs
- Source:
- ImmutableList_1.Builder.cs
- Source:
- ImmutableList_1.Builder.cs
- Source:
- ImmutableList_1.Builder.cs
- Source:
- ImmutableList_1.Builder.cs
搜索指定的对象,并返回从指定索引开始且包含指定数量的元素的不可变列表中第一个匹配项的从零开始的索引。
public:
int IndexOf(T item, int index, int count);
public int IndexOf(T item, int index, int count);
member this.IndexOf : 'T * int * int -> int
Public Function IndexOf (item As T, index As Integer, count As Integer) As Integer
参数
- item
- T
要定位在不可变列表中的对象。 该值可以 null 用于引用类型。
- index
- Int32
从零开始的搜索索引。 0 (零)在空列表中有效。
- count
- Int32
要搜索的节中的元素数。
返回
从零开始且包含index元素数的不可变列表中count项的第一个匹配项的从零开始的索引(如果找到);否则为 -1。
适用于
IndexOf(T, Int32, Int32, IEqualityComparer<T>)
- Source:
- ImmutableList_1.Builder.cs
- Source:
- ImmutableList_1.Builder.cs
- Source:
- ImmutableList_1.Builder.cs
- Source:
- ImmutableList_1.Builder.cs
- Source:
- ImmutableList_1.Builder.cs
- Source:
- ImmutableList_1.Builder.cs
搜索指定的对象,并返回从指定索引开始的元素 ImmutableList<T>.Builder 范围内第一个匹配项的从零开始的索引,并包含指定的元素数。
public:
int IndexOf(T item, int index, int count, System::Collections::Generic::IEqualityComparer<T> ^ equalityComparer);
public int IndexOf(T item, int index, int count, System.Collections.Generic.IEqualityComparer<T> equalityComparer);
public int IndexOf(T item, int index, int count, System.Collections.Generic.IEqualityComparer<T>? equalityComparer);
member this.IndexOf : 'T * int * int * System.Collections.Generic.IEqualityComparer<'T> -> int
Public Function IndexOf (item As T, index As Integer, count As Integer, equalityComparer As IEqualityComparer(Of T)) As Integer
参数
- item
- T
要定位在不可变列表中的对象。 该值可以 null 用于引用类型。
- index
- Int32
从零开始的搜索索引。 0 (零)在空列表中有效。
- count
- Int32
要搜索的元素数。
- equalityComparer
- IEqualityComparer<T>
用于比较元素相等性的值比较器。
返回
从不可变列表中开始 index 且包含 count 元素数的不可变列表中项的第一个匹配项的从零开始的索引(如果找到);否则,-1