C#复习⑦2016年6月22日11:50Main Exception & Namespaces & Assemblies 异常 & 命名空间 & 程序集1.try 语句举例说明FileStream s = null;try {s = new Fil ...
C#复习⑦
2016年6月22日
11:50
Main Exception & Namespaces & Assemblies 异常 & 命名空间 & 程序集
1.try 语句
举例说明
FileStream s = null;try {s = new FileStream(curName, FileMode.Open);...} catch (FileNotFoundException e) {Console.WriteLine("file {0} not found", e.FileName);} catch (IOException) {Console.WriteLine("some IO exception occurred");} catch {Console.WriteLine("some unknown error occurred");} finally {if (s != null) s.Close();}
原标题:C#复习⑦
关键词:C#
*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们:
admin#shaoqun.com
(#换成@)。