public static bool HasChildren(this ConfigurationSection c) { try { IEnumerable <IConfigurationSection> _list = c.GetChildren(); return(_list.GetEnumerator().MoveNext()); } catch (Exception) { return(false); } }