C# try/catchIn C# programming, exception handling is performed by try/catch statement. The try block in C# is used to place the code that may throw exception. The catch block is used to handled the exception. The catch block must be preceded by try block. C# example without try/catchOutput: Unhandled Exception: System.DivideByZeroException: Attempted to divide by zero. C# try/catch exampleOutput: System.DivideByZeroException: Attempted to divide by zero. Rest of the code Next TopicC# finally |
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India