Class DictionaryExtensions
- Namespace
- Visus.AddressValidation.Extensions
- Assembly
- Visus.AddressValidation.dll
Contains extension methods for IDictionary<TKey, TValue> and IReadOnlyDictionary<TKey, TValue> instances.
public static class DictionaryExtensions
- Inheritance
-
DictionaryExtensions
- Inherited Members
Methods
Merge<TKey, TValue>(IDictionary<TKey, TValue>, IReadOnlyDictionary<TKey, TValue>)
Merges the elements from dictionary with the source.
public static void Merge<TKey, TValue>(this IDictionary<TKey, TValue> source, IReadOnlyDictionary<TKey, TValue> dictionary) where TKey : notnull
Parameters
sourceIDictionary<TKey, TValue>The dictionary to merge with.
dictionaryIReadOnlyDictionary<TKey, TValue>The IReadOnlyDictionary<TKey, TValue> to merge from.
Type Parameters
TKeyThe element type of the key.
TValueThe element type of the value.
Remarks
If the key already exists in source, the merge skips that element.