C# 生成TXT到程序路径

            string result1 = AppDomain.CurrentDomain.SetupInformation.ApplicationBase + @"Result\检测数据" + DateTime.Now.ToString("yyyy/MM/dd_HHmmss") + ".txt";
            FileStream fs = new FileStream(result1, FileMode.Append);
            StreamWriter wr = null;
            wr = new StreamWriter(fs);
            wr.WriteLine("测试!");
            wr.Close();

 

posted @ 2020-06-01 09:26  芈璐  阅读(364)  评论(0编辑  收藏  举报