最简单的日志
2013-04-06 22:49 hongjiumu 阅读(161) 评论(7) 编辑 收藏 举报最简单的日志:
public class Logger { public static void Trace(string title,string message) { string path = System.Windows.Forms.Application.StartupPath + "\\Log.txt"; StreamWriter sw = new StreamWriter(path,true); sw.Write("{0}:{1}", title, message); sw.Flush(); sw.Close(); } }