Summary
If the specified `key` is present in the `dictionary`, its value is returned.
Otherwise a new value is added to the `dictionary` and returned.
- Assembly
- Kybernetik
.InspectorGadgets .dll - Namespace
- InspectorGadgets
- Containing Type
- IGUtils
Syntax
public static TValue GetOrAdd<TKey, TValue>(this IDictionary<TKey, TValue> dictionary, TKey key)
where TValue : new()
Type Parameters
Name | Description |
---|---|
TKey | |
TValue |
Parameters
Name | Type | Description |
---|---|---|
dictionary | IDictionary |
|
key | TKey |
Return Value
Type | Description |
---|---|
TValue |