Olvasás angol nyelven Szerkesztés

Megosztás a következőn keresztül:


HashSet<T>.GetAlternateLookup<TAlternate> Method

Definition

Gets an instance of a type that can be used to perform operations on the current HashSet<T> using a TAlternate instead of a T.

C#
public System.Collections.Generic.HashSet<T>.AlternateLookup<TAlternate> GetAlternateLookup<TAlternate>();

Type Parameters

TAlternate

The alternate type of instance for performing lookups.

Returns

The created lookup instance.

Exceptions

The set's comparer is not compatible with TAlternate.

Remarks

The set must use a comparer that implements IAlternateEqualityComparer<TAlternate,T> with TAlternate and T. If it doesn't, an exception is thrown.

Applies to

Termék Verziók
.NET 9, 10