Enumerable.ToHashSet 메서드

정의

오버로드

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

Source:
ToCollection.cs
Source:
ToCollection.cs
Source:
ToCollection.cs
Source:
ToCollection.cs
Source:
ToCollection.cs

HashSet<T> 사용하여 키를 비교하는 IEnumerable<T>comparer 만듭니다.

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)

형식 매개 변수

TSource

의 요소 형식입니다 source.

매개 변수

source
IEnumerable<TSource>

IEnumerable<T> 만들려는 항목입니다HashSet<T>.

comparer
IEqualityComparer<TSource>

IEqualityComparer<T> 키를 비교할 수 있는 항목입니다.

반품

HashSet<TSource>

입력 시퀀스에서 선택한 형식 HashSet<T> 의 값을 포함하는 A TSource 입니다.

예외

sourcenull입니다.

추가 정보

적용 대상

ToHashSet<TSource>(IEnumerable<TSource>)

Source:
ToCollection.cs
Source:
ToCollection.cs
Source:
ToCollection.cs
Source:
ToCollection.cs
Source:
ToCollection.cs

HashSet<T> 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.

매개 변수

source
IEnumerable<TSource>

IEnumerable<T> 만들려는 항목입니다HashSet<T>.

반품

HashSet<TSource>

입력 시퀀스에서 선택한 형식 HashSet<T> 의 값을 포함하는 A TSource 입니다.

예외

sourcenull입니다.

추가 정보

적용 대상