O
Ole
Hi,
Have created the below code - but it doesn't work - the textbox is empty.
Anyone knows why?
MemoryStream memoryStream = new MemoryStream();
XmlSerializer serializer = new XmlSerializer(myClass.GetType());
XmlTextWriter writer = new XmlTextWriter(memoryStream, Encoding.Unicode);
writer.Formatting = Formatting.Indented;
serializer.Serialize(writer, myClass);
memoryStream = (MemoryStream)writer.BaseStream;
StreamReader reader = new StreamReader(memoryStream, Encoding.Unicode);
TextBox1.Text = reader.ReadToEnd();
Thanks
Ole
Have created the below code - but it doesn't work - the textbox is empty.
Anyone knows why?
MemoryStream memoryStream = new MemoryStream();
XmlSerializer serializer = new XmlSerializer(myClass.GetType());
XmlTextWriter writer = new XmlTextWriter(memoryStream, Encoding.Unicode);
writer.Formatting = Formatting.Indented;
serializer.Serialize(writer, myClass);
memoryStream = (MemoryStream)writer.BaseStream;
StreamReader reader = new StreamReader(memoryStream, Encoding.Unicode);
TextBox1.Text = reader.ReadToEnd();
Thanks
Ole