ObjectExtensions..::..AddOrUpdate<(Of <(<'TKey, TValue>)>)> Method
Adds or updates (if key exists) the value in the dictionary.
Namespace:
FastMoq.ExtensionsAssembly: FastMoq.Core (in FastMoq.Core.dll)
Syntax
public static void AddOrUpdate<TKey, TValue>( this IDictionary<TKey, TValue> dictionary, TKey key, TValue value )
<ExtensionAttribute> _ Public Shared Sub AddOrUpdate(Of TKey, TValue) ( _ dictionary As IDictionary(Of TKey, TValue), _ key As TKey, _ value As TValue _ )
[ExtensionAttribute] public: generic<typename TKey, typename TValue> static void AddOrUpdate( IDictionary<TKey, TValue>^ dictionary, TKey key, TValue value )
Type Parameters
- TKey
- The type of the t key.
- TValue
- The type of the t value.
Parameters
- dictionary
- Type: IDictionary<(Of <(<'TKey, TValue>)>)>
The dictionary.
- key
- Type: TKey
The key.
- value
- Type: TValue
The value.