using System.Collections.Generic; namespace Obfuz.Utils { public static class CollectionExtensions { public static void AddRange(this HashSet values, IEnumerable newValues) { foreach (var value in newValues) { values.Add(value); } } public static V GetValueOrDefault(this Dictionary dic, K key) { return dic.TryGetValue(key, out V v) ? v : default(V); } } }