Exception Handling in C# – Part II

Introduction In the previous post, we have covered basics of exception handling, the purpose of exception handling, types of error, list of system exceptions, and some examples of run time error. In this post will cover ways to handle the exceptions in C#, multiple exceptions catches and writing custom exceptions below is the index: How to handle Exception in C# C# provides built-in support to … Continue reading Exception Handling in C# – Part II

Interview Questions: Multiple Catch Block in C#

Introduction In C#, You can use more than one catch block with the try block to handle different types of exceptions means each catch block is used to handle different types of exceptions. For example: Below example, we have added multiple catch block, so let say if the user has entered string value in first input then control will be passed to the FormatException catch … Continue reading Interview Questions: Multiple Catch Block in C#

Exception Handling in C# – Part I

Introduction Exception handling is handling known or unknown errors from the program. So, when any error occurs then the program should recover gracefully from the error. In computing and computer programming, exception handling is the process of responding to the occurrence of exceptions – anomalous or exceptional conditions requiring special processing – during the execution of a program. Wiki The basic purpose of exception handling … Continue reading Exception Handling in C# – Part I