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.
Applies to
.NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기