摘要:
我需要得到一个类的Xml序列化后的字符串using (System.IO.MemoryStream mem = new System.IO.MemoryStream()){ XmlTextWriter writer = new XmlTextWriter(mem, Encoding.UTF8); XmlSerializer xz = new XmlSerializer(t.GetType()); xz.Serialize(writer, t); writer.Close(); byte[] bytes = mem.ToArray(); return Syst... 阅读全文