What is the use of throw statement in C#?

49. What is the use of 'throw' statement in C#?

  1. to return from the calling functions to called function
  2. to throw an exception manually during the execution of the program
  3. to return from the switch statement
  4. None of the above

Answer: B) to throw an exception manually during the execution of the program

Explanation:

The C# throw statement is used to throw an exception manually during the execution of the program.

Comments and Discussions!

Load comments ↻






Copyright © 2024 www.includehelp.com. All rights reserved.