Answer: The code below explains the difference between catch(Exception error) and catch
try
{
//Code that might generate error
}
catch(Exception error)
{
//Catches all Cls-complaint exceptions
}
catch
{
//Catches all other exception including the Non-Cls complaint exceptions
}
Asked In: Many Interviews |
Alert Moderator