Plzzzzzzzzzzz Can Anyone Help Me Out Of This Problem By Tomorrow....lookin Forward For Any One So Nice To Help Me Up..saman

Recommended Answers

All 2 Replies

Well, since you can't dive by zero, thats why its thorowing the error... You could just use try catch blocks. Or if you post your code, we could help you with better error handling.

If you use try catch block...

try{
//The calculator main code...Where the error is getting thrown
}
catch 
{
MessageBox.Show("You divided by zero...");
//Show the error
}
// generate exception
catch (DivideByZeroException e) 
{
   // handle exception
}
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.