ImmutableDictionary.Create 方法

定義

多載

Create<TKey,TValue>()

建立空的不可變字典。

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

建立空的不可變字典,該字典會使用指定的索引鍵比較子。

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

建立空的不可變字典,該字典會使用指定的索引鍵和值比較子。

Create<TKey,TValue>()

建立空的不可變字典。

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

字典所儲存的值類型。

傳回

ImmutableDictionary<TKey,TValue>

空白不可變字典。

適用於

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

建立空的不可變字典,該字典會使用指定的索引鍵比較子。

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>

用於判斷字典中索引鍵等式的實作。

傳回

ImmutableDictionary<TKey,TValue>

空白不可變字典。

適用於

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

建立空的不可變字典,該字典會使用指定的索引鍵和值比較子。

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>

用於判斷字典中的值是否相等的實作。

傳回

ImmutableDictionary<TKey,TValue>

空白不可變字典。

適用於