public static Setting Load(string root) { string path = root + "\\clipnote.config.xml"; Setting ret; try { XmlSerializer serializer = new XmlSerializer(typeof(Setting)); FileStream stream = new FileStream(path, FileMode.Open); ret = (Setting)serializer.Deserialize(stream); stream.Close(); } catch(IOException) { ret = new Setting(); } ret.Initialize(path); return ret; }