CSVHelper.cs 575 B

1234567891011121314151617181920212223
  1. using System;
  2. using System.Collections.Generic;
  3. using System.IO;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7. namespace MainForm.ClassFile.FALibraryClass
  8. {
  9. public class CSVHelper
  10. {
  11. /// <summary>
  12. /// CSV文件添加一行日志
  13. /// </summary>
  14. /// <returns></returns>
  15. public static void CSVFile_AddLog(string filePath, string newLineData)
  16. {
  17. List<string> datas = new List<string>() { newLineData };
  18. File.AppendAllLines(filePath, datas, Encoding.UTF8);
  19. }
  20. }
  21. }