Enumerable.ToHashSet Yöntem
Önemli
Bazı bilgiler ürünün ön sürümüyle ilgilidir ve sürüm öncesinde önemli değişiklikler yapılmış olabilir. Burada verilen bilgilerle ilgili olarak Microsoft açık veya zımni hiçbir garanti vermez.
ToHashSet<TSource>(IEnumerable<TSource>) |
bir içinden bir HashSet<T>IEnumerable<T>oluşturur. |
ToHashSet<TSource>(IEnumerable<TSource>, IEqualityComparer<TSource>) |
anahtarları karşılaştırmak |
- Kaynak:
- ToCollection.cs
- Kaynak:
- ToCollection.cs
- Kaynak:
- ToCollection.cs
bir içinden bir HashSet<T>IEnumerable<T>oluşturur.
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)
Tür Parametreleri
- TSource
öğelerinin source
türü.
Parametreler
- source
- IEnumerable<TSource>
Kaynak IEnumerable<T> oluşturmak için bir HashSet<T> .
Döndürülenler
HashSet<T> Giriş dizisinden seçilen türdeki TSource
değerleri içeren bir.
Özel durumlar
source
, null
değeridir.
Ayrıca bkz.
Şunlara uygulanır
.NET 9 ve diğer sürümler
Ürün | Sürümler |
---|---|
.NET | Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9 |
.NET Framework | 4.7.2, 4.8, 4.8.1 |
.NET Standard | 2.1 |
- Kaynak:
- ToCollection.cs
- Kaynak:
- ToCollection.cs
- Kaynak:
- ToCollection.cs
anahtarları karşılaştırmak comparer
için kullanarak içinden bir HashSet<T>IEnumerable<T> oluşturur.
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)
Tür Parametreleri
- TSource
öğelerinin source
türü.
Parametreler
- source
- IEnumerable<TSource>
Kaynak IEnumerable<T> oluşturmak için bir HashSet<T> .
- comparer
- IEqualityComparer<TSource>
Anahtarları karşılaştırmak için bir IEqualityComparer<T> .
Döndürülenler
HashSet<T> Giriş dizisinden seçilen türdeki TSource
değerleri içeren bir.
Özel durumlar
source
, null
değeridir.
Ayrıca bkz.
Şunlara uygulanır
.NET 9 ve diğer sürümler
Ürün | Sürümler |
---|---|
.NET | Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9 |
.NET Framework | 4.7.2, 4.8, 4.8.1 |
.NET Standard | 2.1 |
.NET geri bildirimi
.NET, açık kaynak bir projedir. Geri bildirim sağlamak için bir bağlantı seçin: