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

정의

오버로드

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

comparer를 사용하여 키를 비교하는 IEnumerable<T>에서 HashSet<T>를 생성합니다.Creates 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>)

IEnumerable<T>에서 HashSet<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>)

comparer를 사용하여 키를 비교하는 IEnumerable<T>에서 HashSet<T>를 생성합니다.Creates 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)

형식 매개 변수

TSource

source 요소의 형식입니다.The type of the elements of source.

매개 변수

source
IEnumerable<TSource>

HashSet<T>을 만들기 위한 IEnumerable<T>입니다.An IEnumerable<T> to create a HashSet<T> from.

comparer
IEqualityComparer<TSource>

키를 비교할 IEqualityComparer<T>입니다.An IEqualityComparer<T> to compare keys.

반환

HashSet<TSource>

입력 시퀀스에서 선택한 TSource 형식 값이 포함된 HashSet<T>입니다.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>)

IEnumerable<T>에서 HashSet<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)

형식 매개 변수

TSource

source 요소의 형식입니다.The type of the elements of source.

매개 변수

source
IEnumerable<TSource>

HashSet<T>을 만들기 위한 IEnumerable<T>입니다.An IEnumerable<T> to create a HashSet<T> from.

반환

HashSet<TSource>

입력 시퀀스에서 선택한 TSource 형식 값이 포함된 HashSet<T>입니다.A HashSet<T> that contains values of type TSource selected from the input sequence.

적용 대상