C#控制台程序,写入文件内容,导出txt文件

C#控制台程序,写入文件内容,导出txt文件

 

string tempFileName = "DETAIL_" + DateTime.Now.ToString("yyyyMMddHHmmssffff") + ".txt";
string tempFilePath = Environment.CurrentDirectory + "\\" + tempFileName; var output = new StreamWriter(tempFilePath, false, Encoding.UTF8); output.WriteLine(api_json_param_str); output.Flush(); output.Close(); output.Dispose();

 

posted on 2022-07-08 17:09  Jankie1122  阅读(64)  评论(0编辑  收藏  举报