ConcurrentDictionary<TKey,TValue>.TryGetAlternateLookup<TAlternateKey> メソッド

定義

ConcurrentDictionary<TKey,TValue>ではなくキーとしてTAlternateKeyを使用してTKeyに対する操作を実行するために使用できる型のインスタンスを取得します。

public:
generic <typename TAlternateKey>
 bool TryGetAlternateLookup([Runtime::InteropServices::Out] System::Collections::Concurrent::ConcurrentDictionary<TKey, TValue>::AlternateLookup<TAlternateKey> % lookup);
public bool TryGetAlternateLookup<TAlternateKey>(out System.Collections.Concurrent.ConcurrentDictionary<TKey,TValue>.AlternateLookup<TAlternateKey> lookup) where TAlternateKey : allows ref struct;
member this.TryGetAlternateLookup : AlternateLookup -> bool
Public Function TryGetAlternateLookup(Of TAlternateKey) (ByRef lookup As ConcurrentDictionary(Of TKey, TValue).AlternateLookup(Of TAlternateKey)) As Boolean

型パラメーター

TAlternateKey

検索を実行するためのキーの代替型。

パラメーター

lookup
ConcurrentDictionary<TKey,TValue>.AlternateLookup<TAlternateKey>

メソッドが trueを返すときに作成された参照インスタンス、またはメソッドが falseを返す場合は使用しない既定のインスタンス。

返品

true ルックアップを作成できる場合。それ以外の場合は false

注釈

このインスタンスは、TAlternateKeyTKeyとのIAlternateEqualityComparer<TAlternate,T>を実装する比較子を使用している必要があります。 そうでない場合、メソッドは falseを返します。

適用対象