//引用using

using System.IO;
using System.Text;

//写入方法

        public void writeToHtml(string fileName, string path, string content)
        {
            string fileAndName = path + "/" + fileName;
            using (FileStream fs = new FileStream(fileAndName, FileMode.Create))
            {
                using (StreamWriter w = new StreamWriter(fs, Encoding.UTF8))
                {
                    w.WriteLine(content);
                }
            }
        }

  

相关文章:

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