語言

ImmutableDictionary.Create 方法

定義

多載

名稱 Description
Create<TKey,TValue>()

建立一個空的不可變字典。

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

建立一個空的不可變字典,使用指定的金鑰比較器。

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

建立一個空的不可變字典,使用指定的鍵值比較器。

Create<TKey,TValue>()

來源:
ImmutableDictionary.cs
來源:
ImmutableDictionary.cs
來源:
ImmutableDictionary.cs
來源:
ImmutableDictionary.cs
來源:
ImmutableDictionary.cs
來源:
ImmutableDictionary.cs
來源:
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>)

來源:
ImmutableDictionary.cs
來源:
ImmutableDictionary.cs
來源:
ImmutableDictionary.cs
來源:
ImmutableDictionary.cs
來源:
ImmutableDictionary.cs
來源:
ImmutableDictionary.cs
來源:
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>)

來源:
ImmutableDictionary.cs
來源:
ImmutableDictionary.cs
來源:
ImmutableDictionary.cs
來源:
ImmutableDictionary.cs
來源:
ImmutableDictionary.cs
來源:
ImmutableDictionary.cs
來源:
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>

用於判定字典中數值相等的實作。

傳回

一本空洞、不可改變的字典。

適用於