using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text; namespace GetData_PLC { class strFileCaoZuo { public static void strAppend(string strFilePath, string strMessage) { using (StreamWriter sw = File.AppendText(strFilePath)) { sw.WriteLine(strMessage); sw.Flush(); sw.Close(); } } } }