FrozenDictionary<TKey,TValue>.GetAlternateLookup<TAlternateKey> Method

Definition

Gets an instance of a type that may be used to perform operations on a FrozenDictionary<TKey,TValue>

using a TAlternateKey as a key instead of a TKey.

C#
public System.Collections.Frozen.FrozenDictionary<TKey,TValue>.AlternateLookup<TAlternateKey> GetAlternateLookup<TAlternateKey>();

Type Parameters

TAlternateKey

The alternate type of a key for performing lookups.

Returns

The created lookup instance.

Exceptions

This instance's comparer is not compatible with TAlternateKey.

Remarks

This instance must be using a comparer that implements IAlternateEqualityComparer<TAlternate,T> with

TAlternateKey and TKey. If it doesn't, an exception will be thrown.

Applies to

Product Versions
.NET 9 (package-provided), 9