Can multiple catch blocks be executed?
Rathrola Prem Kumar
Select an image from your device to upload
Yes
you can use catch block with specific error type like1> for Divide By Zero Exception
catch (DivideByZeroException) { Console.WriteLine(“Not possible to Divide by zero”); }
2> fot Index Out Of Range Exception
catch (IndexOutOfRangeException) { Console.WriteLine(“Index is Out of Range”); }
you can put this both block below try block at a time.