LogiQuest
Back to Exception Handling
12

What is the output of the following program?

string? s = null;
try { Console.Write(s!.Length); }
catch (NullReferenceException) { Console.Write("null"); }
Medium

Discussion (0)

  • No discussion yet. Ask a doubt or share a shortcut.

Log in to join the discussion.