What are other ways to catch the exception.
What are other ways to catch the exception on run time, except the Try catch block. Is it possible ? if yes please let me know how
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.


Farhan ShariffRank #2,004 · 725 reputationPosted Aug 5, 2014, 7:02 AM EDT
VulpesRank #55 · 29.2K reputationPosted Aug 5, 2014, 8:03 AM EDT
http://msdn.microsoft.com/en-us/library/system.appdomain.unhandledexception(v=vs.110).aspx
The alternative to exceptions, which is used in languages such as C, is for your method to return an error code. The calling code then needs to check the return value to see whether an error occurred or not and, if it did, what the reason was for the error. Returning an error code of 0 typically means that no error occurred.