FileStream stream = new FileStream("C:\\employee.xml", FileMode.OpenOrCreate); XmlSerializer serializer = new XmlSerializer(typeof(Day)); serializer.Serialize(stream, monday); serializer.Serialize(stream, tuesday); serializer.Serialize(stream, wednesday); serializer.Serialize(stream, thursday); serializer.Serialize(stream, friday); serializer.Serialize(stream, saturday); serializer.Serialize(stream, sunday);
|