namespace Yw.WinFrmUI { /// /// 字典拓展 /// public static class DictionaryExtensions { /// /// /// public static TValve GetValue(this Dictionary dict, string key) { if (dict == null || dict.Count < 1) { return default; } if (string.IsNullOrEmpty(key)) { return default; } if (dict.ContainsKey(key)) { return dict[key]; } return default; } } }