Monday 12 May 2014

Which exception will catch first and what about finally statement?





try
{
    int b = 0;
    int c = 10 / b;
}
catch (Exception e)
{
}
catch (DivideByZeroException ae)
{
}
finally
{
}


It is throw compile time error

Exception Message:
Error 1 A previous catch clause already catches all exceptions of this or of a super type ('System.Exception')