public static class StringHelper { public static void ToLog(this string content,string txtName) { string filePath = System.Environment.CurrentDirectory + $"\\{txtName}.txt"; if (!System.IO.File.Exists(filePath)) { System.IO.File.Create(filePath).Dispose(); } System.IO.File.AppendAllLines(filePath,new string[] { content }); } }

浙公网安备 33010602011771号