Dictionary<TKey,TValue>.GetAlternateLookup<TAlternateKey> Método
Definição
Importante
Algumas informações dizem respeito a um produto pré-lançado que pode ser substancialmente modificado antes de ser lançado. A Microsoft não faz garantias, de forma expressa ou implícita, em relação à informação aqui apresentada.
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.