nerdexam
GIAC

GSSP-NET · Question #371

You work as a Software Developer for ABC Inc. The Company uses .NET Framework as its application development platform. You are writing a method that might throw an exception at several points during…

The correct answer is B. Finally. See the full explanation below for the reasoning.

Question

You work as a Software Developer for ABC Inc. The Company uses .NET Framework as its application development platform. You are writing a method that might throw an exception at several points during its execution. You need to run several lines of code after the method runs, whether or not an exception occurs. Which of the following blocks will you use to accomplish this task?

Options

  • ACatch
  • BFinally
  • CTry
  • DThrow

How the community answered

(37 responses)
  • A
    8% (3)
  • B
    70% (26)
  • C
    16% (6)
  • D
    5% (2)

Community Discussion

No community discussion yet for this question.

Full GSSP-NET Practice