C Sharp (C#) - Exception Handling
What will be the output of this code?
try {
throw new InvalidOperationException("Invalid operation");
} catch (InvalidOperationException ex) when (ex.Message.Contains("Invalid")) {
Console.WriteLine("Caught invalid operation");
} catch (Exception) {
Console.WriteLine("Caught general exception");
}