string[] table = { "1 a b c d", "2 q r t j", "3 w j s r" };
System.IO.File.WriteAllLines("c:\\test.txt", table);

程式擷錄自https://social.msdn.microsoft.com/Forums/vstudio/en-US/1091f0ca-3bff-44e9-8359-7888fa07fa71/how-to-save-array-in-file-in-c?forum=csharpgeneral

arrow
arrow
    文章標籤
    c# array file array to file
    全站熱搜

    痞客興 發表在 痞客邦 留言(0) 人氣()