โ Back to Exceptions
Question 654
ArgumentNullException
ArgumentNullException
Read one line. Treat the literal textnullas a null string. If the value is null,throw new ArgumentNullException("name"); otherwise printHi <name>. Catch theArgumentNullExceptionand printName is required. Use top-level statements. InputBobprints: Hi Bob Inputnullprints: Name is required
Expected Output:
Hi Bob
Topics:
Exceptions
Code Editor
1
Tab to indent ยท Ctrl+Enter to run ยท Ctrl+Space to expand shortcuts (cw, cr, fori)
Your Output
Run your code to see the output here...
Test Cases
Run your code to see test case results.