摘要: 1 System.IO.TextWriter old = System.Console.Out; //备份原来的stream 2 using (System.IO.TextWriter w = System.IO.File.CreateText("log.txt")) 3 { 4 System.Console.SetOut(w); 5 System.Console.WriteLine("123"); 6 } 7 8 System.Console.SetOut(old); 9 10 System.Diagnostics.Process.Start(&quo 阅读全文
posted @ 2011-04-20 23:44 木由水 阅读(230) 评论(0) 推荐(0) 编辑