2
Answers

XmlSerializer

David Smith

David Smith

11y
919
1
         Below, I am using XmlSerializer write the object data out to xml file. In the object I have 8 elements worth of data. The serializer is only writing the last element to the file and not all the elements. Do you know why. when I look in the m_file, I see all the data I need. But all the data so not go to the file.

         // serialize
         XmlSerializer serializer = new XmlSerializer(typeof(DutyCycleTimes));
         TextWriter writer = new StreamWriter(fileName);
         serializer.Serialize(writer, file, null);
         writer.Close();
Answers (2)