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

Definición

Obtiene una instancia de un tipo que se puede usar para realizar operaciones en el objeto actual Dictionary<TKey,TValue> mediante como TAlternateKey clave en lugar de como 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

TAlternateKey

Tipo alternativo de una clave para realizar búsquedas.

Devoluciones

Instancia de búsqueda creada.

Excepciones

El comparador del diccionario no es compatible con TAlternateKey.

Comentarios

El diccionario debe usar un comparador que implemente IAlternateEqualityComparer<TAlternate,T> con TAlternateKey y TKey. Si no es así, se produce una excepción.

Se aplica a