Enumerable.ToHashSet Enumerable.ToHashSet Enumerable.ToHashSet Enumerable.ToHashSet Method

Definição

Sobrecargas

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

Cria um HashSet<T> de um IEnumerable<T> usando o comparer para comparar chavesCreates a HashSet<T> from an IEnumerable<T> using the comparer to compare keys

ToHashSet<TSource>(IEnumerable<TSource>) ToHashSet<TSource>(IEnumerable<TSource>) ToHashSet<TSource>(IEnumerable<TSource>) ToHashSet<TSource>(IEnumerable<TSource>)

Cria um HashSet<T> de um IEnumerable<T>.Creates a HashSet<T> from an IEnumerable<T>.

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

Cria um HashSet<T> de um IEnumerable<T> usando o comparer para comparar chavesCreates a HashSet<T> from an IEnumerable<T> using the comparer to compare keys

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);
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)

Parâmetros de tipo

TSource

O tipo dos elementos de source.The type of the elements of source.

Parâmetros

source
IEnumerable<TSource>

Um IEnumerable<T> por meio do qual um HashSet<T> será criado.An IEnumerable<T> to create a HashSet<T> from.

comparer
IEqualityComparer<TSource>

Um IEqualityComparer<T> para comparar chaves.An IEqualityComparer<T> to compare keys.

Retornos

HashSet<TSource>

Um HashSet<T> que contém valores do tipo TSource selecionados da sequência de entrada.A HashSet<T> that contains values of type TSource selected from the input sequence.

ToHashSet<TSource>(IEnumerable<TSource>) ToHashSet<TSource>(IEnumerable<TSource>) ToHashSet<TSource>(IEnumerable<TSource>) ToHashSet<TSource>(IEnumerable<TSource>)

Cria um HashSet<T> de um IEnumerable<T>.Creates a HashSet<T> from an 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)

Parâmetros de tipo

TSource

O tipo dos elementos de source.The type of the elements of source.

Parâmetros

source
IEnumerable<TSource>

Um IEnumerable<T> por meio do qual um HashSet<T> será criado.An IEnumerable<T> to create a HashSet<T> from.

Retornos

HashSet<TSource>

Um HashSet<T> que contém os valores do tipo TSource selecionados da sequência de entrada.A HashSet<T> that contains values of type TSource selected from the input sequence.

Aplica-se a