ImmutableDictionary.CreateRangeWithOverwrite メソッド

定義

オーバーロード

名前 説明
CreateRangeWithOverwrite<TKey,TValue>(IEqualityComparer<TKey>, ReadOnlySpan<KeyValuePair<TKey,TValue>>)

指定した項目を含み、指定したキー比較子を使用する新しい変更できないディクショナリを作成します。

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

指定した項目を含む新しい変更できないディクショナリを作成します。

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

ソース:
ImmutableDictionary.cs
ソース:
ImmutableDictionary.cs
ソース:
ImmutableDictionary.cs

指定した項目を含み、指定したキー比較子を使用する新しい変更できないディクショナリを作成します。

public:
generic <typename TKey, typename TValue>
 static System::Collections::Immutable::ImmutableDictionary<TKey, TValue> ^ CreateRangeWithOverwrite(System::Collections::Generic::IEqualityComparer<TKey> ^ keyComparer, ReadOnlySpan<System::Collections::Generic::KeyValuePair<TKey, TValue>> items);
public static System.Collections.Immutable.ImmutableDictionary<TKey,TValue> CreateRangeWithOverwrite<TKey,TValue>(System.Collections.Generic.IEqualityComparer<TKey>? keyComparer, scoped ReadOnlySpan<System.Collections.Generic.KeyValuePair<TKey,TValue>> items);
static member CreateRangeWithOverwrite : System.Collections.Generic.IEqualityComparer<'Key> * ReadOnlySpan<System.Collections.Generic.KeyValuePair<'Key, 'Value>> -> System.Collections.Immutable.ImmutableDictionary<'Key, 'Value>
Public Function CreateRangeWithOverwrite(Of TKey, TValue) (keyComparer As IEqualityComparer(Of TKey), items As ReadOnlySpan(Of KeyValuePair(Of TKey, TValue))) As ImmutableDictionary(Of TKey, TValue)

型パラメーター

TKey

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

TValue

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

パラメーター

keyComparer
IEqualityComparer<TKey>

キーの等価性を比較するために使用する比較子の実装。

items
ReadOnlySpan<KeyValuePair<TKey,TValue>>

変更できない前にディクショナリに追加する項目。

返品

指定した項目を含み、指定した比較子を使用する新しい変更できないディクショナリ。

注釈

CreateRange<TKey,TValue>(IEqualityComparer<TKey>, IEnumerable<KeyValuePair<TKey,TValue>>)とは対照的に、items コレクションに重複するキーがある場合は、例外がスローされるのではなく、最後のキーが使用されます。

適用対象

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

ソース:
ImmutableDictionary.cs
ソース:
ImmutableDictionary.cs
ソース:
ImmutableDictionary.cs

指定した項目を含む新しい変更できないディクショナリを作成します。

public:
generic <typename TKey, typename TValue>
 static System::Collections::Immutable::ImmutableDictionary<TKey, TValue> ^ CreateRangeWithOverwrite(ReadOnlySpan<System::Collections::Generic::KeyValuePair<TKey, TValue>> items);
public static System.Collections.Immutable.ImmutableDictionary<TKey,TValue> CreateRangeWithOverwrite<TKey,TValue>(scoped ReadOnlySpan<System.Collections.Generic.KeyValuePair<TKey,TValue>> items);
static member CreateRangeWithOverwrite : ReadOnlySpan<System.Collections.Generic.KeyValuePair<'Key, 'Value>> -> System.Collections.Immutable.ImmutableDictionary<'Key, 'Value>
Public Function CreateRangeWithOverwrite(Of TKey, TValue) (items As ReadOnlySpan(Of KeyValuePair(Of TKey, TValue))) As ImmutableDictionary(Of TKey, TValue)

型パラメーター

TKey

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

TValue

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

パラメーター

items
ReadOnlySpan<KeyValuePair<TKey,TValue>>

変更できない前にディクショナリを設定するために使用される項目。

返品

指定した項目を含む新しい変更できないディクショナリ。

注釈

CreateRange<TKey,TValue>(IEnumerable<KeyValuePair<TKey,TValue>>)とは対照的に、items コレクションに重複するキーがある場合は、例外がスローされるのではなく、最後のキーが使用されます。

適用対象