在幫同仁Code Review 的時候,看到「標準」的IO寫法,如下:
   try
   {
      FileStream fileStream = new FileStream("c://test.txt",FileMode.Create,FileAccess.Write);
      //IO Process...
      fileStream.Close();
   }
   catch (Exception _Exception)
   {
     throw;
   }
就是基本的try catch,然後就是 Release Resource (Dipose),但其實有更好的寫法,就是使用「using statement」,如下: