調試程序總是會用需要一個日志文件記錄調試過程
可能會存在的問題是
using (StreamWriter SW = File
public void CheckLog(string Log)
{
if (File
{
WriteLog(Log);
}
else
{
CreateLog();
WriteLog(Log);
}
}
private void CreateLog()
{
StreamWriter SW;
SW = File
SW
DateTime
SW
}
private void WriteLog(string Log)
{
using (StreamWriter SW = File
{
SW
SW
}
}
From:http://tw.wingwit.com/Article/program/net/201311/11290.html