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