Skip to main content
Journey Uncommon Logo
JourneyUncommon
easyC#exceptions try catchSingle-choice MCQ

What happens when an exception is thrown inside a try block that has a matching catch, and the catch block itself runs to completion normally?

int Run() { try { throw new InvalidOperationException(); } catch (InvalidOperationException) { return 1; } finally { Console.WriteLine("cleanup"); } }