Farseer

导航

2012年2月27日 #

LinQ To XML 新建文件并增加节点

摘要: XDocumentmyXDoc=newXDocument(newXElement("Results"));myXDoc.Save(_fileName)XDocumentxDocument=XDocument.Load(fileName);xDocument.Root.Add(newXElement("Result",newXAttribute("ItemId",this.itemId),newXAttribute("ItemName",this.itemName)));如果不用xDocument.Root而是直接用 阅读全文

posted @ 2012-02-27 23:12 佛西亚 阅读(707) 评论(1) 推荐(0) 编辑