public static string XmlSerializer<T>(T t, Type[] extraTypes)
{
XmlSerializer serializer = new XmlSerializer(typeof(FX.SL.Common.ConfigHelp), extraTypes);
MemoryStream stream = new MemoryStream();
serializer.Serialize(stream, t);
string str = Encoding.UTF8.GetString(stream.ToArray(),0,(int)stream.Length);
return str;
}
XML序列化
最新推荐文章于 2022-04-08 21:45:00 发布