摘要:
测试1: public static int test1() { int i = 1; try { return ++i; } finally { ++i; Console.WriteLine("finally:" + i); } } static void Main(string[] args) { Console.WriteLine("Main:" + test1()); }结果:finally:3Main:2测试2: public static int test2() { int i = 1; try { throw new Exception() 阅读全文
posted @ 2010-03-31 16:45 小飞龙(Jack) 阅读(370) 评论(0) 推荐(1) 编辑