private void Form1_Load(object sender, EventArgs e) { int n = 0; MessageBox.Show((7 / n).ToString()); // won't throw an Exception when run inside VS }
private void Form1_Shown(object sender, EventArgs e) { int n = 0; MessageBox.Show((7 / n).ToString()); // will throw an exception, regardless of where it is run }
No comments:
Post a Comment