DictExtensions Class |
Namespace: KSPDev.Extensions
The DictExtensions type exposes the following members.
Name | Description | |
---|---|---|
![]() ![]() ![]() | SetDefaultK, V |
Returns a value from the dictionary by a key. If the key is not present yet, then a new
default entry is created and returned.
|
public static void SetDefaultAddToDict(Dictionary<int, HashSet<string>> dict) { // If key 123 doesn't exist it will be created automatically. dict.SetDefault(123).Add("abc"); }