会覆盖已存在文件
File.WriteAllText(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "abv.json"), "创建连接字符串开始");

true不会覆盖已存在文件
StreamWriter sw = new StreamWriter(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "abv.json"), true);
sw.Write("创建连接字符串结束");
sw.Close();

 

相关文章:

  • 2021-09-01
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-07
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-06-07
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-02
相关资源
相似解决方案