Enumerable.ToHashSet Metoda

Definicja

Przeciążenia

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

Tworzy HashSet<T> na podstawie IEnumerable<T> przy użyciu comparer do porównywania kluczy.

ToHashSet<TSource>(IEnumerable<TSource>)

Tworzy HashSet<T> na podstawie IEnumerable<T>.

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

Źródło:
ToCollection.cs
Źródło:
ToCollection.cs
Źródło:
ToCollection.cs
Źródło:
ToCollection.cs
Źródło:
ToCollection.cs

Tworzy HashSet<T> na podstawie IEnumerable<T> przy użyciu comparer do porównywania kluczy.

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)

Parametry typu

TSource

Typ elementów elementu source.

Parametry

source
IEnumerable<TSource>

Element IEnumerable<T> do utworzenia HashSet<T> elementu na podstawie.

comparer
IEqualityComparer<TSource>

Element IEqualityComparer<T> do porównywania kluczy.

Zwraca

HashSet<TSource>

Element HashSet<T> zawierający wartości typu TSource wybranego z sekwencji danych wejściowych.

Wyjątki

Parametr source ma wartość null.

Zobacz też

Dotyczy

ToHashSet<TSource>(IEnumerable<TSource>)

Źródło:
ToCollection.cs
Źródło:
ToCollection.cs
Źródło:
ToCollection.cs
Źródło:
ToCollection.cs
Źródło:
ToCollection.cs

Tworzy HashSet<T> na podstawie IEnumerable<T>.

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)

Parametry typu

TSource

Typ elementów elementu source.

Parametry

source
IEnumerable<TSource>

Element IEnumerable<T> do utworzenia HashSet<T> elementu na podstawie.

Zwraca

HashSet<TSource>

Element HashSet<T> zawierający wartości typu TSource wybranego z sekwencji danych wejściowych.

Wyjątki

Parametr source ma wartość null.

Zobacz też

Dotyczy