日期:2014-05-18 浏览次数:20807 次
using System; using System.Collections.Generic; using System.Text; using System.IO; namespace ConsoleApplication10 { class Program { static void Main(string[] args) { try { StreamWriter sw = new StreamWriter("C:\\test.txt"); sw.WriteLine("Test"); sw.Close(); } catch (Exception ex) { Console.WriteLine("Err: " + ex.Message); } finally { Console.WriteLine("Write END"); } Console.ReadLine(); } } }