private void btncheck_Click(object sender, EventArgs e)
{
int int1 = 0;
int int2 = 5;
int intresult;
try
{
throw new ArgumentOutOfRangeException();
intresult = int2 / int1;
}
catch (DivideByZeroException)
{
MessageBox.Show("Divide by zero error.", "Exception");
return;
}
catch (Exception ex)
{
MessageBox.Show("Error: ", "Exception Thrown");
}
finally
{
MessageBox.Show("Finally");
}
}
}