Enumerable.ToHashSet Yöntem
Tanım
Ö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.
Aşırı Yüklemeler
ToHashSet<TSource>(IEnumerable<TSource>) |
bir 'den bir HashSet<T>IEnumerable<T>oluşturur. |
ToHashSet<TSource>(IEnumerable<TSource>, IEqualityComparer<TSource>) |
anahtarları karşılaştırmak için kullanarak |
ToHashSet<TSource>(IEnumerable<TSource>)
bir 'den 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>
Oluşturulacak IEnumerable<T>HashSet<T> kaynak.
Döndürülenler
HashSet<T> Giriş dizisinden seçilen tür TSource
değerlerini içeren bir.
Özel durumlar
source
, null
değeridir.
Ayrıca bkz.
Şunlara uygulanır
ToHashSet<TSource>(IEnumerable<TSource>, IEqualityComparer<TSource>)
anahtarları karşılaştırmak için kullanarak comparer
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>
Oluşturulacak IEnumerable<T>HashSet<T> kaynak.
- comparer
- IEqualityComparer<TSource>
Anahtarları karşılaştırmak için bir IEqualityComparer<T> .
Döndürülenler
HashSet<T> Giriş dizisinden seçilen tür TSource
değerlerini içeren bir.
Özel durumlar
source
, null
değeridir.
Ayrıca bkz.
Şunlara uygulanır
Geri Bildirim
https://aka.ms/ContentUserFeedback.
Çok yakında: 2024 boyunca, içerik için geri bildirim mekanizması olarak GitHub Sorunları’nı kullanımdan kaldıracak ve yeni bir geri bildirim sistemiyle değiştireceğiz. Daha fazla bilgi için bkz.Gönderin ve geri bildirimi görüntüleyin