<pre lang="c#">
public static string PointOfFailure(string[] employeeNames)
{
try
{
return employeeNames[3];
}
catch (System.IndexOutOfRangeException e)
{
return "Array not valid length";
}
catch (Exception)
{
return "Corrupt Data";
}
}
}
} multiple catch blocks can be there, on to handle specific type like
System.IndexOutOfRangeException
. Other for remaining all.