string path= System.Windows.Forms.Application.StartupPath + "\\ErrorLog\\"+fileName +".txt";
            if (!File.Exists(path))
            {
                FileInfo myfile = new FileInfo(path);
                FileStream fs = myfile.Create();
                fs.Close();
            }
            StreamWriter sw = File.AppendText(path);
            sw.WriteLine(errorMsg);
            sw.Flush();
            sw.Close();

相关文章:

  • 2021-08-19
  • 2022-12-23
  • 2022-12-23
  • 2021-12-14
  • 2021-11-02
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-02-03
  • 2022-12-23
  • 2022-12-23
  • 2021-12-28
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案