ImmutableSortedDictionary.Create Method

Definition

Overloads

Create<TKey,TValue>()

Creates an empty immutable sorted dictionary.

Create<TKey,TValue>(IComparer<TKey>)

Creates an empty immutable sorted dictionary that uses the specified key comparer.

Create<TKey,TValue>(IComparer<TKey>, IEqualityComparer<TValue>)

Creates an empty immutable sorted dictionary that uses the specified key and value comparers.

Create<TKey,TValue>()

Source:
ImmutableSortedDictionary.cs
Source:
ImmutableSortedDictionary.cs
Source:
ImmutableSortedDictionary.cs
Source:
ImmutableSortedDictionary.cs

Creates an empty immutable sorted dictionary.

C#
public static System.Collections.Immutable.ImmutableSortedDictionary<TKey,TValue> Create<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 sorted dictionary.

Applies to

.NET 10 och andra versioner
Produkt Versioner
.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

Create<TKey,TValue>(IComparer<TKey>)

Source:
ImmutableSortedDictionary.cs
Source:
ImmutableSortedDictionary.cs
Source:
ImmutableSortedDictionary.cs
Source:
ImmutableSortedDictionary.cs

Creates an empty immutable sorted dictionary that uses the specified key comparer.

C#
public static System.Collections.Immutable.ImmutableSortedDictionary<TKey,TValue> Create<TKey,TValue>(System.Collections.Generic.IComparer<TKey> keyComparer);
C#
public static System.Collections.Immutable.ImmutableSortedDictionary<TKey,TValue> Create<TKey,TValue>(System.Collections.Generic.IComparer<TKey>? keyComparer);

Type Parameters

TKey

The type of keys stored by the dictionary.

TValue

The type of values stored by the dictionary.

Parameters

keyComparer
IComparer<TKey>

The implementation to use to determine the equality of keys in the dictionary.

Returns

An empty immutable sorted dictionary.

Applies to

.NET 10 och andra versioner
Produkt Versioner
.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

Create<TKey,TValue>(IComparer<TKey>, IEqualityComparer<TValue>)

Source:
ImmutableSortedDictionary.cs
Source:
ImmutableSortedDictionary.cs
Source:
ImmutableSortedDictionary.cs
Source:
ImmutableSortedDictionary.cs

Creates an empty immutable sorted dictionary that uses the specified key and value comparers.

C#
public static System.Collections.Immutable.ImmutableSortedDictionary<TKey,TValue> Create<TKey,TValue>(System.Collections.Generic.IComparer<TKey> keyComparer, System.Collections.Generic.IEqualityComparer<TValue> valueComparer);
C#
public static System.Collections.Immutable.ImmutableSortedDictionary<TKey,TValue> Create<TKey,TValue>(System.Collections.Generic.IComparer<TKey>? keyComparer, System.Collections.Generic.IEqualityComparer<TValue>? valueComparer);

Type Parameters

TKey

The type of keys stored by the dictionary.

TValue

The type of values stored by the dictionary.

Parameters

keyComparer
IComparer<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 sorted dictionary.

Applies to

.NET 10 och andra versioner
Produkt Versioner
.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