Język

Dictionary<TKey,TValue>.GetAlternateLookup<TAlternateKey> Metoda

Definicja

Pobiera wystąpienie typu, które może służyć do wykonywania operacji na bieżącym Dictionary<TKey,TValue> przy użyciu TAlternateKey jako klucza zamiast TKey.

public:
generic <typename TAlternateKey>
 System::Collections::Generic::Dictionary<TKey, TValue>::AlternateLookup<TAlternateKey> GetAlternateLookup();
public System.Collections.Generic.Dictionary<TKey,TValue>.AlternateLookup<TAlternateKey> GetAlternateLookup<TAlternateKey>() where TAlternateKey : allows ref struct;
member this.GetAlternateLookup : unit -> System.Collections.Generic.Dictionary<'Key, 'Value>.AlternateLookup<'AlternateKey>
Public Function GetAlternateLookup(Of TAlternateKey) () As Dictionary(Of TKey, TValue).AlternateLookup(Of TAlternateKey)

Parametry typu

TAlternateKey

Alternatywny typ klucza do wykonywania odnośników.

Zwraca

Utworzone wystąpienie odnośnika.

Wyjątki

Moduł porównujący słownika nie jest zgodny z elementem TAlternateKey.

Uwagi

Słownik musi używać narzędzia porównującego, który implementuje IAlternateEqualityComparer<TAlternate,T> element i TAlternateKeyTKey. Jeśli tak nie jest, zostanie zgłoszony wyjątek.

Dotyczy