MemoryStream memoryStream = new MemoryStream();
XmlSerializer xs = new XmlSerializer(typeof(ConfigState));
XmlTextWriter xmlTextWriter = new XmlTextWriter(memoryStream, Encoding.UTF8);
xs.Serialize(xmlTextWriter, cs);
string configXml = Encoding.UTF8.GetString(memoryStream.ToArray());
No comments:
Post a Comment