private bool GetBool(string key, bool standard) { var match = _configFile.Descendants(key).ToList(); if (match.Any()) { bool result; if (bool.TryParse(match.First().Value, out result)) { return result; } } return standard; }