AddSafe<>(dic, key1, key2, value, comparer) IndexOf<>(source, predicate, startIndex) IndexOf<>(source, element, comparer) JoinString<>(values, separator, prefix, suffix, lastSeparator) Order<>(source, comparer) SkipLast<>(source, count, throwIfNotEnough) Split<>(source, chunkSize) Split<>(splitWhat, splitWhere) ToDictionary2<>(source, key1Selector, key2Selector, comparer1, comparer2) ToDictionary2<>(source, key1Selector, key2Selector, elementSelector, comparer1, comparer2)
Legend Class Struct Enum Interface Delegate | Constructor Method Property Event Field |
| Extension method: int IncSafe<K>(this IDictionary<K, int>, K, int)Declarationpublic static int IncSafe<K>(
this IDictionary<K, int> dic,
K key,
int amount = 1
)Summary
Increments an integer in an IDictionary<TKey, TValue> by the specified amount. If the specified
key does not exist in the current dictionary, the value amount is inserted. Generic type parameters| K |
Type of the key of the dictionary. |
Parameters| this IDictionary<K, int> | dic |
Dictionary to operate on. | | K | key |
Key at which the list is located in the dictionary. | | int | amount |
The amount by which to increment the integer. |
Returns
The new value at the specified key. |