Enumerable.ToHashSet Yöntem

Tanım

Aşırı Yüklemeler

ToHashSet<TSource>(IEnumerable<TSource>)

bir 'den bir HashSet<T>IEnumerable<T>oluşturur.

ToHashSet<TSource>(IEnumerable<TSource>, IEqualityComparer<TSource>)

anahtarları karşılaştırmak için kullanarak comparer içinden bir HashSet<T>IEnumerable<T> oluşturur.

ToHashSet<TSource>(IEnumerable<TSource>)

bir 'den bir HashSet<T>IEnumerable<T>oluşturur.

public:
generic <typename TSource>
[System::Runtime::CompilerServices::Extension]
 static System::Collections::Generic::HashSet<TSource> ^ ToHashSet(System::Collections::Generic::IEnumerable<TSource> ^ source);
public static System.Collections.Generic.HashSet<TSource> ToHashSet<TSource> (this System.Collections.Generic.IEnumerable<TSource> source);
static member ToHashSet : seq<'Source> -> System.Collections.Generic.HashSet<'Source>
<Extension()>
Public Function ToHashSet(Of TSource) (source As IEnumerable(Of TSource)) As HashSet(Of TSource)

Tür Parametreleri

TSource

öğelerinin sourcetürü.

Parametreler

source
IEnumerable<TSource>

Oluşturulacak IEnumerable<T>HashSet<T> kaynak.

Döndürülenler

HashSet<TSource>

HashSet<T> Giriş dizisinden seçilen tür TSource değerlerini içeren bir.

Özel durumlar

source, null değeridir.

Ayrıca bkz.

Şunlara uygulanır

ToHashSet<TSource>(IEnumerable<TSource>, IEqualityComparer<TSource>)

anahtarları karşılaştırmak için kullanarak comparer içinden bir HashSet<T>IEnumerable<T> oluşturur.

public:
generic <typename TSource>
[System::Runtime::CompilerServices::Extension]
 static System::Collections::Generic::HashSet<TSource> ^ ToHashSet(System::Collections::Generic::IEnumerable<TSource> ^ source, System::Collections::Generic::IEqualityComparer<TSource> ^ comparer);
public static System.Collections.Generic.HashSet<TSource> ToHashSet<TSource> (this System.Collections.Generic.IEnumerable<TSource> source, System.Collections.Generic.IEqualityComparer<TSource>? comparer);
public static System.Collections.Generic.HashSet<TSource> ToHashSet<TSource> (this System.Collections.Generic.IEnumerable<TSource> source, System.Collections.Generic.IEqualityComparer<TSource> comparer);
static member ToHashSet : seq<'Source> * System.Collections.Generic.IEqualityComparer<'Source> -> System.Collections.Generic.HashSet<'Source>
<Extension()>
Public Function ToHashSet(Of TSource) (source As IEnumerable(Of TSource), comparer As IEqualityComparer(Of TSource)) As HashSet(Of TSource)

Tür Parametreleri

TSource

öğelerinin sourcetürü.

Parametreler

source
IEnumerable<TSource>

Oluşturulacak IEnumerable<T>HashSet<T> kaynak.

comparer
IEqualityComparer<TSource>

Anahtarları karşılaştırmak için bir IEqualityComparer<T> .

Döndürülenler

HashSet<TSource>

HashSet<T> Giriş dizisinden seçilen tür TSource değerlerini içeren bir.

Özel durumlar

source, null değeridir.

Ayrıca bkz.

Şunlara uygulanır