ImmutableDictionary.CreateRangeWithOverwrite Metod
Definition
Viktigt
En del information gäller för förhandsversionen av en produkt och kan komma att ändras avsevärt innan produkten blir allmänt tillgänglig. Microsoft lämnar inga garantier, uttryckliga eller underförstådda, avseende informationen som visas här.
Överlagringar
| Name | Description |
|---|---|
| CreateRangeWithOverwrite<TKey,TValue>(IEqualityComparer<TKey>, ReadOnlySpan<KeyValuePair<TKey,TValue>>) |
Skapar en ny oföränderlig ordlista som innehåller de angivna objekten och använder den angivna nyckeljäxaren. |
| CreateRangeWithOverwrite<TKey,TValue>(ReadOnlySpan<KeyValuePair<TKey,TValue>>) |
Skapar en ny oföränderlig ordlista som innehåller de angivna objekten. |
CreateRangeWithOverwrite<TKey,TValue>(IEqualityComparer<TKey>, ReadOnlySpan<KeyValuePair<TKey,TValue>>)
- Källa:
- ImmutableDictionary.cs
- Källa:
- ImmutableDictionary.cs
- Källa:
- ImmutableDictionary.cs
Skapar en ny oföränderlig ordlista som innehåller de angivna objekten och använder den angivna nyckeljäxaren.
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)
Typparametrar
- TKey
Typ av nycklar i ordlistan.
- TValue
Typ av värden i ordlistan.
Parametrar
- keyComparer
- IEqualityComparer<TKey>
Jämförelseimplementeringen som ska användas för att jämföra nycklar för likhet.
- items
- ReadOnlySpan<KeyValuePair<TKey,TValue>>
De objekt som ska läggas till i ordlistan innan de inte kan ändras.
Returer
En ny oföränderlig ordlista som innehåller de angivna objekten och använder den angivna jämförelsen.
Kommentarer
Om det till skillnad från finns dubbletter av nycklar i items samlingen används den sista i stället för CreateRange<TKey,TValue>(IEqualityComparer<TKey>, IEnumerable<KeyValuePair<TKey,TValue>>)ett undantag som genereras.
Gäller för
CreateRangeWithOverwrite<TKey,TValue>(ReadOnlySpan<KeyValuePair<TKey,TValue>>)
- Källa:
- ImmutableDictionary.cs
- Källa:
- ImmutableDictionary.cs
- Källa:
- ImmutableDictionary.cs
Skapar en ny oföränderlig ordlista som innehåller de angivna objekten.
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)
Typparametrar
- TKey
Typ av nycklar i ordlistan.
- TValue
Typ av värden i ordlistan.
Parametrar
- items
- ReadOnlySpan<KeyValuePair<TKey,TValue>>
De objekt som används för att fylla i ordlistan innan den inte kan ändras.
Returer
En ny oföränderlig ordlista som innehåller de angivna objekten.
Kommentarer
Om det till skillnad från finns dubbletter av nycklar i items samlingen används den sista i stället för CreateRange<TKey,TValue>(IEnumerable<KeyValuePair<TKey,TValue>>)ett undantag som genereras.