ImmutableDictionary.CreateRangeWithOverwrite 메서드

정의

오버로드

Name Description
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>>)

Source:
ImmutableDictionary.cs
Source:
ImmutableDictionary.cs
Source:
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 중복 키가 있는 경우 예외가 throw되는 대신 마지막 키가 사용됩니다.

적용 대상

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

Source:
ImmutableDictionary.cs
Source:
ImmutableDictionary.cs
Source:
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 중복 키가 있는 경우 예외가 throw되는 대신 마지막 키가 사용됩니다.

적용 대상