Sir,
I getting a error while executing the function to divide with a zero value. Here the Error:-
I want to obstruct the catch block display Message box above. And to display the message box :- Cannot divide by a zero value instead of exception.

Bineesh ViswanathPosted Mar 5, 2014, 4:51 AM
From inspecting your code, It seems to be a simple one.
Here the suggestion from my end:-
catch (DivideByZeroException ex)
{
MessageBoxEx.Show(ex.Message + "Cannot divide by a zero value", "form1", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
Hope you got the right answer. if yes, please mark it as correct.
Abhijit PatilPosted Mar 5, 2014, 1:45 AM
you can use debugger for short cut key f9.and then check using f11.and check either all value are came properly or not.
the above error was occoured because of due to the value which you passed to for divide.the value is not passed the properly or zero is passing so it give above error.
hope it helps.
Regards,
Abhijit patil.
http://dotnetbyabhipatil.blogspot.in
Lakshmanan Sethu SankaranarayanPosted Mar 5, 2014, 1:11 AM
Lakshmanan Sethu SankaranarayanPosted Mar 5, 2014, 1:09 AM