HashSet<T>.GetAlternateLookup<TAlternate> Méthode
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Obtient une instance d’un type qui peut être utilisée pour effectuer des opérations sur le courant HashSet<T> à l’aide d’un TAlternate au lieu d’un T.
public:
generic <typename TAlternate>
System::Collections::Generic::HashSet<T>::AlternateLookup<TAlternate> GetAlternateLookup();
public System.Collections.Generic.HashSet<T>.AlternateLookup<TAlternate> GetAlternateLookup<TAlternate>() where TAlternate : allows ref struct;
member this.GetAlternateLookup : unit -> System.Collections.Generic.HashSet<'T>.AlternateLookup<'Alternate>
Public Function GetAlternateLookup(Of TAlternate) () As HashSet(Of T).AlternateLookup(Of TAlternate)
Paramètres de type
- TAlternate
Autre type d’instance pour effectuer des recherches.
Retours
Instance de recherche créée.
Exceptions
Le comparateur du jeu n’est pas compatible avec TAlternate.
Remarques
L’ensemble doit utiliser un comparateur qui implémente IAlternateEqualityComparer<TAlternate,T> avec TAlternate et T. Si ce n’est pas le cas, une exception est levée.