C#中DataTable转换为string
时间:2016-07-23 21:02:30
收藏:0
阅读:907
DataTable dt = new DataTable();
DataSet ds = new DataSet();
ds.Tables.Add(dt);
System.IO.StringWriter sw = new System.IO.StringWriter();
System.Xml.XmlTextWriter xw = new System.Xml.XmlTextWriter(sw);
ds.WriteXml(xm)
string s = sw.ToString();
评论(0)