.NET Framework · Puzzle
C# Puzzle: Exceptions
What is the output when you run this code?
[code lang=”csharp” light=”true”]
try
{
try
{
throw new Exception("A");
}
catch
{
throw new Exception("B");
}
finally
{
throw new Exception("C");
}
}
catch (Exception ex)
{
Console.Write(ex.Message);
}
[/code]
See the result: https://dotnetfiddle.net/6SWPqL