FrozenSet<T>.TryGetAlternateLookup<TAlternate> Method

Definition

Gets an instance of a type that may be used to perform operations on a FrozenSet<T> using a TAlternate instead of a T.

C#
public bool TryGetAlternateLookup<TAlternate> (out System.Collections.Frozen.FrozenSet<T>.AlternateLookup<TAlternate> lookup);

Type Parameters

TAlternate

The alternate type of a key for performing lookups.

Parameters

lookup
FrozenSet<T>.AlternateLookup<TAlternate>

The created lookup instance when the method returns true, or a default instance that should not be used if the method returns false.

Returns

true if a lookup could be created; otherwise, false.

Remarks

This instance must be using a comparer that implements IAlternateEqualityComparer<TAlternate,T> with TAlternate and T. If it doesn't, the method will return false.

Applies to

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