using System.Collections.Generic; namespace Config.Net.Core { static class Extensions { public static TValue? GetValueOrDefaultInternal(this IDictionary dictionary, TKey key) where TKey: notnull where TValue: class { if (!dictionary.TryGetValue(key, out TValue? value)) return default(TValue); return value; } } }