我们需要在XML与实体类,DataTable,List之间进行转换,下面是XmlUtil类,该类来自网络并稍加修改. using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.IO; using System.Data; using System.Xml; using System.Xml.Serialization; /// <summary> ///…
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.IO; using System.Data; using System.Xml; using System.Xml.Serialization; /// <summary> /// Xml序列化与反序列化 /// </summary> public class XmlUtil { #re…
using System; using System.Xml; using System.Xml.Serialization; using System.IO; namespace LOTool { public class LO_XMLTool { #region 反序列化 /// <summary> /// 反序列化 /// </summary> /// <param name="type">类型</param> /// <pa…
转自:http://www.cnblogs.com/zzyyll2/archive/2010/07/20/1781649.html dataset和实体类 之间的转换 //dataset转实体类 代码 public static IList<T> FillModel(DataSet ds) { List<T> l = new List<T>(); T model = default(T); if (ds.Tables[0].Columns[0].ColumnNa…