一、問題描述

將執行結果 result_array 輸出至檔案 data.txt

二、方法

// ******* output the result to the file ****
System.IO.StreamWriter sw = new System.IO.StreamWriter("data.txt"); // open the file for streamwriter
foreach (double reconstructed_egg_result in result_array)
{
       sw.WriteLine(reconstructed_egg_result); // output the reslut to the file (WriteLine or Write)
}

sw.Close(); // close the file

arrow
arrow
    文章標籤
    C#
    全站熱搜

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