public static void SaveSettings(string demoName, DicomDemoSettings settings) { try { string filename = GetSettingsFilename(demoName); XmlSerializer xs = new XmlSerializer(typeof(DicomDemoSettings)); using (TextWriter xmlTextWriter = new StreamWriter(filename)) { xs.Serialize(xmlTextWriter, settings); xmlTextWriter.Close(); } } catch (Exception) { throw; } }
public static void SaveSettings ( string demoName, DicomDemoSettings settings ) { try { string filename = GetSettingsFilename(demoName); XmlSerializer xs = new XmlSerializer(typeof(DicomDemoSettings)); using (TextWriter xmlTextWriter = new StreamWriter(filename)) { xs.Serialize(xmlTextWriter, settings); xmlTextWriter.Close(); } } catch (Exception) { throw; } }