ImmutableHashSet.CreateRange Method
Definition
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.
Overloads
CreateRange<T>(IEnumerable<T>) |
Creates a new immutable hash set prefilled with the specified items. |
CreateRange<T>(IEqualityComparer<T>, IEnumerable<T>) |
Creates a new immutable hash set that contains the specified items and uses the specified equality comparer for the set type. |
CreateRange<T>(IEnumerable<T>)
- Source:
- ImmutableHashSet.cs
- Source:
- ImmutableHashSet.cs
- Source:
- ImmutableHashSet.cs
Creates a new immutable hash set prefilled with the specified items.
public:
generic <typename T>
static System::Collections::Immutable::ImmutableHashSet<T> ^ CreateRange(System::Collections::Generic::IEnumerable<T> ^ items);
public static System.Collections.Immutable.ImmutableHashSet<T> CreateRange<T> (System.Collections.Generic.IEnumerable<T> items);
static member CreateRange : seq<'T> -> System.Collections.Immutable.ImmutableHashSet<'T>
Public Function CreateRange(Of T) (items As IEnumerable(Of T)) As ImmutableHashSet(Of T)
Type Parameters
- T
The type of items stored by the collection.
Parameters
- items
- IEnumerable<T>
The items to add to the hash set.
Returns
The new immutable hash set that contains the specified items.
Applies to
CreateRange<T>(IEqualityComparer<T>, IEnumerable<T>)
- Source:
- ImmutableHashSet.cs
- Source:
- ImmutableHashSet.cs
- Source:
- ImmutableHashSet.cs
Creates a new immutable hash set that contains the specified items and uses the specified equality comparer for the set type.
public:
generic <typename T>
static System::Collections::Immutable::ImmutableHashSet<T> ^ CreateRange(System::Collections::Generic::IEqualityComparer<T> ^ equalityComparer, System::Collections::Generic::IEnumerable<T> ^ items);
public static System.Collections.Immutable.ImmutableHashSet<T> CreateRange<T> (System.Collections.Generic.IEqualityComparer<T> equalityComparer, System.Collections.Generic.IEnumerable<T> items);
public static System.Collections.Immutable.ImmutableHashSet<T> CreateRange<T> (System.Collections.Generic.IEqualityComparer<T>? equalityComparer, System.Collections.Generic.IEnumerable<T> items);
static member CreateRange : System.Collections.Generic.IEqualityComparer<'T> * seq<'T> -> System.Collections.Immutable.ImmutableHashSet<'T>
Public Function CreateRange(Of T) (equalityComparer As IEqualityComparer(Of T), items As IEnumerable(Of T)) As ImmutableHashSet(Of T)
Type Parameters
- T
The type of items stored in the collection.
Parameters
- equalityComparer
- IEqualityComparer<T>
The object to use for comparing objects in the set for equality.
- items
- IEnumerable<T>
The items add to the collection before immutability is applied.
Returns
The new immutable hash set.