public static void Save(string fileName, FestManagerSettings settings) { var serializer = new XmlSerializer(typeof(FestManagerSettings)); using (var writer = new StreamWriter(fileName)) { serializer.Serialize(writer, settings); } }
public static FestManagerSettings Load(string fileName) { FestManagerSettings result = null; var serializer = new XmlSerializer(typeof(FestManagerSettings)); using (var reader = new StreamReader(fileName)) { result = (FestManagerSettings)serializer.Deserialize(reader); } return(result); }