【发布时间】:2015-11-02 23:41:47
【问题描述】:
现在我有 csv 文件,其中包含 Worker、Account Id、Account Code、Hierarchy 和 Date 列。如何编写 c# 代码将 csv 文件转换为 xml 文件?
select new XElement("Worker",
new XElement("Account Id", columns[0]),
new XElement("Account Code", columns[1]),
new XElement("Hierarchy", columns[2]),
new XElement("Date", columns[3]),
现在我有类似的代码,我该如何改进该代码?
【问题讨论】:
-
这对你不起作用?