I hope I got my question correct as I am new to everything .net. I need to serialize a class so that I can write it to an xml document but I also need to use the xml so I can pass it to another process. I am trying to use an system.io.streamwriter because the system.io.stringwriter uses utf-16 instead of utf-8. Can someone give me hints as what I need to use to serialize the class so that I can write the xml file but use the xml string in my program to pass toanother process. Thanks.
here is a some test code that I have thrown together to work out my issue:
dim sw as system.io.stringwriter
xslsizer = New System.Xml.Serialization.XmlSerializer(GetType(Class1))
xslsizer.Serialize(sw, theclass)
Dim str As String = sw.ToString
Dim f2 As New Form2
f2.TextBox1.Text = str
f2.Show()
here is a some test code that I have thrown together to work out my issue:
dim sw as system.io.stringwriter
xslsizer = New System.Xml.Serialization.XmlSerializer(GetType(Class1))
xslsizer.Serialize(sw, theclass)
Dim str As String = sw.ToString
Dim f2 As New Form2
f2.TextBox1.Text = str
f2.Show()
Last edited: