Enumerable.ToHashSet メソッド
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
オーバーロード
| 名前 | 説明 |
|---|---|
| ToHashSet<TSource>(IEnumerable<TSource>, IEqualityComparer<TSource>) |
キーを比較する HashSet<T> を使用して、IEnumerable<T> から |
| ToHashSet<TSource>(IEnumerable<TSource>) |
HashSet<T>から IEnumerable<T> を作成します。 |
ToHashSet<TSource>(IEnumerable<TSource>, IEqualityComparer<TSource>)
キーを比較する 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);
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>
HashSet<T>を作成するIEnumerable<T>。
- comparer
- IEqualityComparer<TSource>
キーを比較する IEqualityComparer<T> 。
返品
入力シーケンスから選択HashSet<T>型の値を含むTSource。
例外
source は nullです。
こちらもご覧ください
適用対象
ToHashSet<TSource>(IEnumerable<TSource>)
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>
HashSet<T>を作成するIEnumerable<T>。
返品
入力シーケンスから選択HashSet<T>型の値を含むTSource。
例外
source は nullです。