标签:
关键词:
XmlSerializer
StreamWriter
保存xml文件
代码:
public static void SaveXML<T>(string xmlFilePath, T instance) { XmlSerializer xs = new XmlSerializer(typeof(T)); StreamWriter sw = new StreamWriter(xmlFilePath); xs.Serialize(sw,instance); sw.Close(); }
标签:
原文地址:http://www.cnblogs.com/jacketlin/p/5695822.html