Writing a CSV file in .net

前端 未结 11 1386
生来不讨喜
生来不讨喜 2020-11-27 18:59

I have a requirement to export a dataset as a CSV file.

I have spent a while searching for a set of rules to go by and realised there are quite a few rules and exce

11条回答
  •  醉酒成梦
    2020-11-27 19:35

    Can you use a string array and then concatenate using:

    string out = "";
    string[] elements = { "1", "2" };
    foreach(string s in elements) { out += s + "," };
    out = out.substring(0, out.Length-1);
    

提交回复
热议问题