DataSet保存成XML时,出现"Specified cast is not valid."错误,急
有一现成ds,现需要增加一列文本数据
ds.Tables[0].Columns.Add(new DataColumn("Text", typeof(string),""));
for(int i=0;i<ds.Tables[0].Rows.Count;i++)
{
ds.Tables[0].Rows[i]["Text"] = "<td class='Class'>天气好<span>今天</span></td>"
}
ds.Tables[0].AcceptChanges();
ds.WriteXml("c://text.xml");
在最后ds.WriteXml("c://text.xml");时出错"Specified cast is not valid."
请问是什么原因啊?如何解决啊?