Dictionary<TKey,TValue>.GetAlternateLookup<TAlternateKey> Method
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets an instance of a type that can be used to perform operations on the current Dictionary<TKey,TValue> using a TAlternateKey
as a key instead of a 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>();
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)
- TAlternateKey
The alternate type of a key for performing lookups.
The created lookup instance.
The dictionary's comparer is not compatible with TAlternateKey
.
The dictionary must use a comparer that implements IAlternateEqualityComparer<TAlternate,T> with TAlternateKey
and TKey
. If it doesn't, an exception is thrown.
Product | Versions |
---|---|
.NET | 9 |
.NET feedback
.NET is an open source project. Select a link to provide feedback: