摘要:
前段时间做object转换xml想了很多,所有打算整理下 做成以下的通用方法。public static bool ObjectToXml(string filePath, T t) { XmlSerializer xs = new XmlSerializer(typeof(P2PRestoreInfo)); Stream stream = new FileStream(filePath, FileMode.Create, FileAccess.Write, FileShare.ReadWrite); xs.Ser... 阅读全文