ImmutableList.LastIndexOf メソッド

定義

オーバーロード

LastIndexOf<T>(IImmutableList<T>, T)

変更できないリスト全体から、指定したオブジェクトを検索し、最後に見つかったオブジェクトの 0 から始まるインデックスを返します。

LastIndexOf<T>(IImmutableList<T>, T, IEqualityComparer<T>)

変更できないリスト全体から、指定したオブジェクトを検索し、最後に見つかったオブジェクトの 0 から始まるインデックスを返します。

LastIndexOf<T>(IImmutableList<T>, T, Int32)

変更できないリストのうち、最初の要素から指定したインデックスまでの要素範囲の中で、指定したオブジェクトを検索し、最後に出現する位置の 0 から始まるインデックス番号を返します。

LastIndexOf<T>(IImmutableList<T>, T, Int32, Int32)

変更できないリストのうち、最初の要素から指定したインデックスまでの要素範囲の中で、指定したオブジェクトを検索し、最後に出現する位置の 0 から始まるインデックス番号を返します。

LastIndexOf<T>(IImmutableList<T>, T)

変更できないリスト全体から、指定したオブジェクトを検索し、最後に見つかったオブジェクトの 0 から始まるインデックスを返します。

public:
generic <typename T>
[System::Runtime::CompilerServices::Extension]
 static int LastIndexOf(System::Collections::Immutable::IImmutableList<T> ^ list, T item);
public static int LastIndexOf<T> (this System.Collections.Immutable.IImmutableList<T> list, T item);
static member LastIndexOf : System.Collections.Immutable.IImmutableList<'T> * 'T -> int
<Extension()>
Public Function LastIndexOf(Of T) (list As IImmutableList(Of T), item As T) As Integer

型パラメーター

T

リスト内の項目の型。

パラメーター

list
IImmutableList<T>

検索するリスト。

item
T

変更できないリスト内で検索するオブジェクト。 参照型の場合は、値を null にできます。

戻り値

Int32

変更できないリスト全体で項目を検索し、見つかった場合は、インデックス番号の最も大きい要素の 0 から始まるインデックス番号、それ以外の場合は -1。

適用対象

LastIndexOf<T>(IImmutableList<T>, T, IEqualityComparer<T>)

変更できないリスト全体から、指定したオブジェクトを検索し、最後に見つかったオブジェクトの 0 から始まるインデックスを返します。

public:
generic <typename T>
[System::Runtime::CompilerServices::Extension]
 static int LastIndexOf(System::Collections::Immutable::IImmutableList<T> ^ list, T item, System::Collections::Generic::IEqualityComparer<T> ^ equalityComparer);
public static int LastIndexOf<T> (this System.Collections.Immutable.IImmutableList<T> list, T item, System.Collections.Generic.IEqualityComparer<T> equalityComparer);
public static int LastIndexOf<T> (this System.Collections.Immutable.IImmutableList<T> list, T item, System.Collections.Generic.IEqualityComparer<T>? equalityComparer);
static member LastIndexOf : System.Collections.Immutable.IImmutableList<'T> * 'T * System.Collections.Generic.IEqualityComparer<'T> -> int
<Extension()>
Public Function LastIndexOf(Of T) (list As IImmutableList(Of T), item As T, equalityComparer As IEqualityComparer(Of T)) As Integer

型パラメーター

T

リスト内の項目の型。

パラメーター

list
IImmutableList<T>

検索するリスト。

item
T

変更できないリスト内で検索するオブジェクト。 参照型の場合は、値を null にできます。

equalityComparer
IEqualityComparer<T>

検索に使用する等値比較子。

戻り値

Int32

変更できないリスト全体で項目を検索し、見つかった場合は、インデックス番号の最も大きい要素の 0 から始まるインデックス番号、それ以外の場合は -1。

適用対象

LastIndexOf<T>(IImmutableList<T>, T, Int32)

変更できないリストのうち、最初の要素から指定したインデックスまでの要素範囲の中で、指定したオブジェクトを検索し、最後に出現する位置の 0 から始まるインデックス番号を返します。

public:
generic <typename T>
[System::Runtime::CompilerServices::Extension]
 static int LastIndexOf(System::Collections::Immutable::IImmutableList<T> ^ list, T item, int startIndex);
public static int LastIndexOf<T> (this System.Collections.Immutable.IImmutableList<T> list, T item, int startIndex);
static member LastIndexOf : System.Collections.Immutable.IImmutableList<'T> * 'T * int -> int
<Extension()>
Public Function LastIndexOf(Of T) (list As IImmutableList(Of T), item As T, startIndex As Integer) As Integer

型パラメーター

T

リスト内の項目の型。

パラメーター

list
IImmutableList<T>

検索するリスト。

item
T

変更できないリスト内で検索するオブジェクト。 参照型の場合は、値を null にできます。

startIndex
Int32

後方検索の開始位置を示す 0 から始まるインデックス。

戻り値

Int32

変更できないリストのうち、最初の要素からインデックスまでの要素範囲内で項目が見つかった場合は、最後に見つかった位置の 0 から始まるインデックス番号。それ以外の場合は -1。

適用対象

LastIndexOf<T>(IImmutableList<T>, T, Int32, Int32)

変更できないリストのうち、最初の要素から指定したインデックスまでの要素範囲の中で、指定したオブジェクトを検索し、最後に出現する位置の 0 から始まるインデックス番号を返します。

public:
generic <typename T>
[System::Runtime::CompilerServices::Extension]
 static int LastIndexOf(System::Collections::Immutable::IImmutableList<T> ^ list, T item, int startIndex, int count);
public static int LastIndexOf<T> (this System.Collections.Immutable.IImmutableList<T> list, T item, int startIndex, int count);
static member LastIndexOf : System.Collections.Immutable.IImmutableList<'T> * 'T * int * int -> int
<Extension()>
Public Function LastIndexOf(Of T) (list As IImmutableList(Of T), item As T, startIndex As Integer, count As Integer) As Integer

型パラメーター

T

リスト内の項目の型。

パラメーター

list
IImmutableList<T>

検索するリスト。

item
T

変更できないリスト内で検索するオブジェクト。 参照型の場合は、値を null にできます。

startIndex
Int32

後方検索の開始位置を示す 0 から始まるインデックス。

count
Int32

検索対象の範囲内にある要素の数。

戻り値

Int32

変更できないリストのうち、最初の要素からインデックスまでの要素範囲内で項目が見つかった場合は、最後に見つかった位置の 0 から始まるインデックス番号。それ以外の場合は -1。

適用対象