ImmutableDictionary.Create 方法

定义

重载

Create<TKey,TValue>()

创建一个空的不可变字典。

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

创建使用指定键比较器的空不可变字典。

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

创建使用指定键和值比较器的空不可变字典。

Create<TKey,TValue>()

Source:
ImmutableDictionary.cs
Source:
ImmutableDictionary.cs
Source:
ImmutableDictionary.cs

创建一个空的不可变字典。

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)

类型参数

TKey

字典存储的键的类型。

TValue

字典存储的值的类型。

返回

空的不可变字典。

适用于

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

Source:
ImmutableDictionary.cs
Source:
ImmutableDictionary.cs
Source:
ImmutableDictionary.cs

创建使用指定键比较器的空不可变字典。

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)

类型参数

TKey

字典存储的键的类型。

TValue

字典存储的值的类型。

参数

keyComparer
IEqualityComparer<TKey>

用于确定字典中键的相等性的实现。

返回

空的不可变字典。

适用于

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

Source:
ImmutableDictionary.cs
Source:
ImmutableDictionary.cs
Source:
ImmutableDictionary.cs

创建使用指定键和值比较器的空不可变字典。

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)

类型参数

TKey

字典存储的键的类型。

TValue

字典存储的值的类型。

参数

keyComparer
IEqualityComparer<TKey>

用于确定字典中键的相等性的实现。

valueComparer
IEqualityComparer<TValue>

用于确定字典中值的相等性的实现。

返回

空的不可变字典。

适用于