public static ConfigSetting Load(string path) { ConfigSetting setting = new ConfigSetting(); try { if (!string.IsNullOrEmpty(path)) { XmlSerializer serializer = new XmlSerializer(typeof(ConfigSetting)); using (Stream stream = new FileStream(path, FileMode.Open, FileAccess.Read)) { return((ConfigSetting)serializer.Deserialize(stream)); } } } catch (Exception exception) { throw exception; } return(null); }