Dictionary<TKey,TValue>.GetAlternateLookup<TAlternateKey> Método

Definição

Obtém uma instância de um tipo que pode ser usada para realizar operações na corrente Dictionary<TKey,TValue> usando a TAlternateKey como chave em vez de um 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)

Parâmetros de Tipo Genérico

TAlternateKey

O tipo alternativo de chave para realizar pesquisas.

Devoluções

A instância de pesquisa criada.

Exceções

O comparador do dicionário não é compatível com TAlternateKey.

Observações

O dicionário deve usar um comparador que implemente IAlternateEqualityComparer<TAlternate,T> com TAlternateKey e TKey. Se não acontecer, é lançada uma exceção.

Aplica-se a