IDictionaryExtensionsAddOrGetTKey, TValue(IDictionaryTKey, TValue, TKey, TValue) Method
Adds the specified key and value to the specified IDictionaryTKey, TValue
if the key does not already exist, and returns the value.
Namespace: DevCase.Extensions.IDictionaryExtensionsAssembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[EditorBrowsableAttribute(EditorBrowsableState.Always)]
public static TValue AddOrGet<TKey, TValue>(
this IDictionary<TKey, TValue> sender,
TKey key,
TValue value
)
<ExtensionAttribute>
<EditorBrowsableAttribute(EditorBrowsableState.Always)>
Public Shared Function AddOrGet(Of TKey, TValue) (
sender As IDictionary(Of TKey, TValue),
key As TKey,
value As TValue
) As TValue
Dim sender As IDictionary(Of TKey, TValue)
Dim key As TKey
Dim value As TValue
Dim returnValue As TValue
returnValue = sender.AddOrGet(key,
value)
public:
[ExtensionAttribute]
[EditorBrowsableAttribute(EditorBrowsableState::Always)]
generic<typename TKey, typename TValue>
static TValue AddOrGet(
IDictionary<TKey, TValue>^ sender,
TKey key,
TValue value
)
[<ExtensionAttribute>]
[<EditorBrowsableAttribute(EditorBrowsableState.Always)>]
static member AddOrGet :
sender : IDictionary<'TKey, 'TValue> *
key : 'TKey *
value : 'TValue -> 'TValue
No code example is currently available or this language may not be supported.
- sender IDictionaryTKey, TValue
-
The source IDictionaryTKey, TValue.
- key TKey
-
The key to add.
- value TValue
-
The value to add.
- TKey
- TValue
TValue
The value.
In Visual Basic and C#, you can call this method as an instance method on any object of type
IDictionaryTKey,
TValue. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).