C# 打日志

1 //写日志,测试

2         private void WriteLog(string content)

3         {

4             StreamWriter log = new StreamWriter("c:\\ceshi.txt", true);

5 

6             log.WriteLine(content);

7 

8             log.Close(); 

9         }

 

你可能感兴趣的:(C#)