public void save_settings(SETTINGS set) { try { XmlSerializer ser = new XmlSerializer(typeof(SETTINGS)); FileStream str = new FileStream(@getpath(), FileMode.Create); ser.Serialize(str, set); str.Close(); } catch (Exception) { } }
public SETTINGS open_settings() { SETTINGS value = new SETTINGS(); try { XmlSerializer ser = new XmlSerializer(typeof(SETTINGS)); StreamReader sr = new StreamReader(@getpath()); value = (SETTINGS)ser.Deserialize(sr); sr.Close(); } catch (Exception ) {} return value; }