Language

FrozenDictionary.Create メソッド

定義

オーバーロード

Name 説明
Create<TKey,TValue>(ReadOnlySpan<KeyValuePair<TKey,TValue>>)

指定したキーと値のペアを使用して FrozenDictionary<TKey,TValue> を作成します。

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

指定したキーと値のペアを使用して FrozenDictionary<TKey,TValue> を作成します。

Create<TKey,TValue>(ReadOnlySpan<KeyValuePair<TKey,TValue>>)

ソース:
FrozenDictionary.cs
ソース:
FrozenDictionary.cs
ソース:
FrozenDictionary.cs

指定したキーと値のペアを使用して FrozenDictionary<TKey,TValue> を作成します。

public:
generic <typename TKey, typename TValue>
 static System::Collections::Frozen::FrozenDictionary<TKey, TValue> ^ Create(ReadOnlySpan<System::Collections::Generic::KeyValuePair<TKey, TValue>> source);
public static System.Collections.Frozen.FrozenDictionary<TKey,TValue> Create<TKey,TValue>(scoped ReadOnlySpan<System.Collections.Generic.KeyValuePair<TKey,TValue>> source);
static member Create : ReadOnlySpan<System.Collections.Generic.KeyValuePair<'Key, 'Value>> -> System.Collections.Frozen.FrozenDictionary<'Key, 'Value>
Public Function Create(Of TKey, TValue) (source As ReadOnlySpan(Of KeyValuePair(Of TKey, TValue))) As FrozenDictionary(Of TKey, TValue)

型パラメーター

TKey

ディクショナリ内のキーの型。

TValue

ディクショナリ内の値の型。

パラメーター

source
ReadOnlySpan<KeyValuePair<TKey,TValue>>

ディクショナリの設定に使用するキーと値のペア。

戻り値

指定したキーと値を含む FrozenDictionary<TKey,TValue> 。

注釈

入力に同じキーが複数回出現する場合は、シーケンス内の後者のキーが優先されます。 これは、複数の重複するキーが例外になる ToDictionaryとは異なります。

適用対象

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

ソース:
FrozenDictionary.cs
ソース:
FrozenDictionary.cs
ソース:
FrozenDictionary.cs

指定したキーと値のペアを使用して FrozenDictionary<TKey,TValue> を作成します。

public:
generic <typename TKey, typename TValue>
 static System::Collections::Frozen::FrozenDictionary<TKey, TValue> ^ Create(System::Collections::Generic::IEqualityComparer<TKey> ^ comparer, ReadOnlySpan<System::Collections::Generic::KeyValuePair<TKey, TValue>> source);
public static System.Collections.Frozen.FrozenDictionary<TKey,TValue> Create<TKey,TValue>(System.Collections.Generic.IEqualityComparer<TKey>? comparer, scoped ReadOnlySpan<System.Collections.Generic.KeyValuePair<TKey,TValue>> source);
static member Create : System.Collections.Generic.IEqualityComparer<'Key> * ReadOnlySpan<System.Collections.Generic.KeyValuePair<'Key, 'Value>> -> System.Collections.Frozen.FrozenDictionary<'Key, 'Value>
Public Function Create(Of TKey, TValue) (comparer As IEqualityComparer(Of TKey), source As ReadOnlySpan(Of KeyValuePair(Of TKey, TValue))) As FrozenDictionary(Of TKey, TValue)

型パラメーター

TKey

ディクショナリ内のキーの型。

TValue

ディクショナリ内の値の型。

パラメーター

comparer
IEqualityComparer<TKey>

キーの等価性を比較するために使用する比較子の実装。 null の場合、Default が使用されます。

source
ReadOnlySpan<KeyValuePair<TKey,TValue>>

ディクショナリの設定に使用するキーと値のペア。

戻り値

指定したキーと値を含む FrozenDictionary<TKey,TValue> 。

注釈

入力に同じキーが複数回出現する場合は、シーケンス内の後者のキーが優先されます。 これは、複数の重複するキーが例外になる ToDictionaryとは異なります。

適用対象