ImmutableDictionary.Create 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.
Create<TKey,TValue>() |
Creates an empty immutable dictionary. |
Create<TKey,TValue>(IEqualityComparer<TKey>) |
Creates an empty immutable dictionary that uses the specified key comparer. |
Create<TKey,TValue>(IEqualityComparer<TKey>, IEqualityComparer<TValue>) |
Creates an empty immutable dictionary that uses the specified key and value comparers. |
- Source:
- ImmutableDictionary.cs
- Source:
- ImmutableDictionary.cs
- Source:
- ImmutableDictionary.cs
- Source:
- ImmutableDictionary.cs
Creates an empty immutable dictionary.
public:
generic <typename TKey, typename TValue>
static System::Collections::Immutable::ImmutableDictionary<TKey, TValue> ^ Create();
public static System.Collections.Immutable.ImmutableDictionary<TKey,TValue> Create<TKey,TValue>();
static member Create : unit -> System.Collections.Immutable.ImmutableDictionary<'Key, 'Value>
Public Function Create(Of TKey, TValue) () As ImmutableDictionary(Of TKey, TValue)
Type Parameters
- TKey
The type of keys stored by the dictionary.
- TValue
The type of values stored by the dictionary.
Returns
An empty immutable dictionary.
Applies to
.NET 10 and other versions
Product | Versions |
---|---|
.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, 10 (package-provided), 10 |
.NET Standard | 2.0 (package-provided) |
UWP | 10.0 |
- Source:
- ImmutableDictionary.cs
- Source:
- ImmutableDictionary.cs
- Source:
- ImmutableDictionary.cs
- Source:
- ImmutableDictionary.cs
Creates an empty immutable dictionary that uses the specified key comparer.
public:
generic <typename TKey, typename TValue>
static System::Collections::Immutable::ImmutableDictionary<TKey, TValue> ^ Create(System::Collections::Generic::IEqualityComparer<TKey> ^ keyComparer);
public static System.Collections.Immutable.ImmutableDictionary<TKey,TValue> Create<TKey,TValue>(System.Collections.Generic.IEqualityComparer<TKey> keyComparer);
public static System.Collections.Immutable.ImmutableDictionary<TKey,TValue> Create<TKey,TValue>(System.Collections.Generic.IEqualityComparer<TKey>? keyComparer);
static member Create : System.Collections.Generic.IEqualityComparer<'Key> -> System.Collections.Immutable.ImmutableDictionary<'Key, 'Value>
Public Function Create(Of TKey, TValue) (keyComparer As IEqualityComparer(Of TKey)) As ImmutableDictionary(Of TKey, TValue)
Type Parameters
- TKey
The type of keys stored by the dictionary.
- TValue
The type of values stored by the dictionary.
Parameters
- keyComparer
- IEqualityComparer<TKey>
The implementation to use to determine the equality of keys in the dictionary.
Returns
An empty immutable dictionary.
Applies to
.NET 10 and other versions
Product | Versions |
---|---|
.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, 10 (package-provided), 10 |
.NET Standard | 2.0 (package-provided) |
UWP | 10.0 |
- Source:
- ImmutableDictionary.cs
- Source:
- ImmutableDictionary.cs
- Source:
- ImmutableDictionary.cs
- Source:
- ImmutableDictionary.cs
Creates an empty immutable dictionary that uses the specified key and value comparers.
public:
generic <typename TKey, typename TValue>
static System::Collections::Immutable::ImmutableDictionary<TKey, TValue> ^ Create(System::Collections::Generic::IEqualityComparer<TKey> ^ keyComparer, System::Collections::Generic::IEqualityComparer<TValue> ^ valueComparer);
public static System.Collections.Immutable.ImmutableDictionary<TKey,TValue> Create<TKey,TValue>(System.Collections.Generic.IEqualityComparer<TKey> keyComparer, System.Collections.Generic.IEqualityComparer<TValue> valueComparer);
public static System.Collections.Immutable.ImmutableDictionary<TKey,TValue> Create<TKey,TValue>(System.Collections.Generic.IEqualityComparer<TKey>? keyComparer, System.Collections.Generic.IEqualityComparer<TValue>? valueComparer);
static member Create : System.Collections.Generic.IEqualityComparer<'Key> * System.Collections.Generic.IEqualityComparer<'Value> -> System.Collections.Immutable.ImmutableDictionary<'Key, 'Value>
Public Function Create(Of TKey, TValue) (keyComparer As IEqualityComparer(Of TKey), valueComparer As IEqualityComparer(Of TValue)) As ImmutableDictionary(Of TKey, TValue)
Type Parameters
- TKey
The type of keys stored by the dictionary.
- TValue
The type of values stored by the dictionary.
Parameters
- keyComparer
- IEqualityComparer<TKey>
The implementation to use to determine the equality of keys in the dictionary.
- valueComparer
- IEqualityComparer<TValue>
The implementation to use to determine the equality of values in the dictionary.
Returns
An empty immutable dictionary.
Applies to
.NET 10 and other versions
Product | Versions |
---|---|
.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, 10 (package-provided), 10 |
.NET Standard | 2.0 (package-provided) |
UWP | 10.0 |
.NET feedback
.NET is an open source project. Select a link to provide feedback: