一、問題描述
將執行結果 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
文章標籤
全站熱搜
留言列表