while Debugging the console hangs up in the middle of the program & shows an unexpected Exception in it
Please Find me a Solution for this problem
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Suthish NairPosted Feb 19, 2012, 12:50 PM
VulpesPosted Feb 16, 2012, 11:10 AM
The easiest way to prevent that is to use double.TryParse rather than double.Parse. This returns false if the string entered can't be parsed to a double and sets the variable passed to it as an output parameter to 0.