存储日志
public void log(string neirong) { var path = @"D:\xx文件名xx\Log\" + "日志" + ".log"; using (StreamWriter st = new StreamWriter(path, append: true)) { st.WriteLine( " " + DateTime.Now + " " + neirong); } }
2021-10-02 05:32:12
存储日志
public void log(string neirong) { var path = @"D:\xx文件名xx\Log\" + "日志" + ".log"; using (StreamWriter st = new StreamWriter(path, append: true)) { st.WriteLine( " " + DateTime.Now + " " + neirong); } }