码迷,mamicode.com
首页 > 其他好文 > 详细

Try Catch Finally working steps

时间:2014-08-02 15:10:54      阅读:191      评论:0      收藏:0      [点我收藏+]

标签:style   blog   http   color   os   io   art   cti   

bubuko.com,布布扣
 1 private void comboBox1_SelectionChangeCommitted(object sender, EventArgs e)
 2         {
 3             if (comboBox1.SelectedItem != null)
 4             {
 5                 MessageBox.Show(((DataRowView)comboBox1.SelectedItem)["Name"] + "  = " + ((DataRowView)comboBox1.SelectedItem)["Value"]);
 6             }
 7 
 8             try
 9             {
10                 int i = 1;
11                 int k = 0;
12 
13                 int r = i / k;
14 
15             }
16             catch (Exception ex)
17             {
18 
19                 throw (ex);
20                 //return;
21             }
22 
23             //MessageBox.Show("After Exception continue..."); //if no finally, it is ok. with finally syntax error.
24 
25             finally
26             {
27                 MessageBox.Show("After Exception Finally...");
28 
29             }
30 
31             MessageBox.Show(".....After Exception continue...");
32         }
View Code

 

Try Catch Finally working steps,布布扣,bubuko.com

Try Catch Finally working steps

标签:style   blog   http   color   os   io   art   cti   

原文地址:http://www.cnblogs.com/kevinygq/p/3886929.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!