ImmutableHashSet.ToImmutableHashSet Method
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
ToImmutableHashSet<TSource>(IEnumerable<TSource>) |
Enumerates a sequence and produces an immutable hash set of its contents. |
ToImmutableHashSet<TSource>(ImmutableHashSet<TSource>.Builder) |
Creates an immutable hash set from the current contents of the builder's set. |
ToImmutableHashSet<TSource>(IEnumerable<TSource>, IEqualityComparer<TSource>) |
Enumerates a sequence, produces an immutable hash set of its contents, and uses the specified equality comparer for the set type. |
- Source:
- ImmutableHashSet.cs
- Source:
- ImmutableHashSet.cs
- Source:
- ImmutableHashSet.cs
- Source:
- ImmutableHashSet.cs
Enumerates a sequence and produces an immutable hash set of its contents.
public:
generic <typename TSource>
[System::Runtime::CompilerServices::Extension]
static System::Collections::Immutable::ImmutableHashSet<TSource> ^ ToImmutableHashSet(System::Collections::Generic::IEnumerable<TSource> ^ source);
public static System.Collections.Immutable.ImmutableHashSet<TSource> ToImmutableHashSet<TSource> (this System.Collections.Generic.IEnumerable<TSource> source);
static member ToImmutableHashSet : seq<'Source> -> System.Collections.Immutable.ImmutableHashSet<'Source>
<Extension()>
Public Function ToImmutableHashSet(Of TSource) (source As IEnumerable(Of TSource)) As ImmutableHashSet(Of TSource)
Type Parameters
- TSource
The type of the elements in the sequence.
Parameters
- source
- IEnumerable<TSource>
The sequence to enumerate.
Returns
An immutable hash set that contains the items in the specified sequence.
Applies to
.NET 9 και άλλες εκδόσεις
Προϊόν | Εκδόσεις |
---|---|
.NET | Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8 (package-provided), 8, 9 (package-provided), 9 |
.NET Framework | 4.7 (package-provided), 4.7.1 (package-provided), 4.7.2 (package-provided), 4.8 (package-provided) |
.NET Standard | 2.0 (package-provided) |
UWP | 10.0 |
- Source:
- ImmutableHashSet.cs
- Source:
- ImmutableHashSet.cs
- Source:
- ImmutableHashSet.cs
- Source:
- ImmutableHashSet.cs
Creates an immutable hash set from the current contents of the builder's set.
public:
generic <typename TSource>
[System::Runtime::CompilerServices::Extension]
static System::Collections::Immutable::ImmutableHashSet<TSource> ^ ToImmutableHashSet(System::Collections::Immutable::ImmutableHashSet<TSource>::Builder ^ builder);
public static System.Collections.Immutable.ImmutableHashSet<TSource> ToImmutableHashSet<TSource> (this System.Collections.Immutable.ImmutableHashSet<TSource>.Builder builder);
static member ToImmutableHashSet : System.Collections.Immutable.ImmutableHashSet<'Source>.Builder -> System.Collections.Immutable.ImmutableHashSet<'Source>
<Extension()>
Public Function ToImmutableHashSet(Of TSource) (builder As ImmutableHashSet(Of TSource).Builder) As ImmutableHashSet(Of TSource)
Type Parameters
- TSource
The type of the elements in the hash set.
Parameters
- builder
- ImmutableHashSet<TSource>.Builder
The builder to create the immutable hash set from.
Returns
An immutable hash set that contains the current contents in the builder's set.
Applies to
.NET 9 και άλλες εκδόσεις
Προϊόν | Εκδόσεις |
---|---|
.NET | Core 3.0, Core 3.1, 5, 6, 7, 8 (package-provided), 8, 9 (package-provided), 9 |
.NET Framework | 4.7 (package-provided), 4.7.1 (package-provided), 4.7.2 (package-provided), 4.8 (package-provided) |
.NET Standard | 2.0 (package-provided) |
- Source:
- ImmutableHashSet.cs
- Source:
- ImmutableHashSet.cs
- Source:
- ImmutableHashSet.cs
- Source:
- ImmutableHashSet.cs
Enumerates a sequence, produces an immutable hash set of its contents, and uses the specified equality comparer for the set type.
public:
generic <typename TSource>
[System::Runtime::CompilerServices::Extension]
static System::Collections::Immutable::ImmutableHashSet<TSource> ^ ToImmutableHashSet(System::Collections::Generic::IEnumerable<TSource> ^ source, System::Collections::Generic::IEqualityComparer<TSource> ^ equalityComparer);
public static System.Collections.Immutable.ImmutableHashSet<TSource> ToImmutableHashSet<TSource> (this System.Collections.Generic.IEnumerable<TSource> source, System.Collections.Generic.IEqualityComparer<TSource> equalityComparer);
public static System.Collections.Immutable.ImmutableHashSet<TSource> ToImmutableHashSet<TSource> (this System.Collections.Generic.IEnumerable<TSource> source, System.Collections.Generic.IEqualityComparer<TSource>? equalityComparer);
static member ToImmutableHashSet : seq<'Source> * System.Collections.Generic.IEqualityComparer<'Source> -> System.Collections.Immutable.ImmutableHashSet<'Source>
<Extension()>
Public Function ToImmutableHashSet(Of TSource) (source As IEnumerable(Of TSource), equalityComparer As IEqualityComparer(Of TSource)) As ImmutableHashSet(Of TSource)
Type Parameters
- TSource
The type of the elements in the sequence.
Parameters
- source
- IEnumerable<TSource>
The sequence to enumerate.
- equalityComparer
- IEqualityComparer<TSource>
The object to use for comparing objects in the set for equality.
Returns
An immutable hash set that contains the items in the specified sequence and uses the specified equality comparer.
Applies to
.NET 9 και άλλες εκδόσεις
Προϊόν | Εκδόσεις |
---|---|
.NET | Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8 (package-provided), 8, 9 (package-provided), 9 |
.NET Framework | 4.7 (package-provided), 4.7.1 (package-provided), 4.7.2 (package-provided), 4.8 (package-provided) |
.NET Standard | 2.0 (package-provided) |
UWP | 10.0 |
.NET σχόλια
.NET είναι ένα έργο ανοιχτού κώδικα. Επιλέξτε μια σύνδεση για να παρέχετε σχόλια: