//函数用于写日志文件
public static void WriteLog(string Content)
{
//FileInfo myFile = new FileInfo("filename");
//StreamWriter sw = myFile.CreateText();
//sw.Write(Content);
//sw.Close();
//文本文档写入内容
using (System.IO.StreamWriter sw = System.IO.File.AppendText(@"E:/log.log"))
{
sw.WriteLine(DateTime.Now.ToString()+Content);
sw.Dispose();
}
}