C Sharp (C#) - Exception Handling
Identify the error in this code snippet:
try {
// some code
} catch (Exception ex) when {
Console.WriteLine(ex.Message);
}Identify the error in this code snippet:
try {
// some code
} catch (Exception ex) when {
Console.WriteLine(ex.Message);
}when clause requires a boolean condition expression after it.when without any condition, which is a syntax error.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions