| 发表于:2007-03-15 15:48:293楼 得分:3 |
再如: using system; class exceptiontestclass { public static void main() { int x = 0; try { int y = 100/x; } catch (arithmeticexception e) { console.writeline( "arithmeticexception handler: {0} ", e.tostring()); } catch (exception e) { console.writeline( "generic exception handler: {0} ", e.tostring()); } } } | | |
|