I have an XML file that I am deserializing, the funny part is an XML file that has been serialized using the following code:
enter code here var serializer = new XmlSerializer(typeof(CommonMessage)); var writer = new StreamWriter("OutPut.txt"); serializer.Serialize(writer, commonMessage); writer.Close();
And I'm trying to deserialize it again to check if the result matches the input signal. anyway, here is my code for deserializing:
var serializer = new XmlSerializer(typeof(CommonMessage)); var reader = new StringReader(InputFileName); CommonMessage commonMessage = (CommonMessage)serializer.Deserialize(reader);
c # xml-deserialization
jprbest
source share