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)- A8% (3)
- B70% (26)
- C16% (6)
- D5% (2)
Community Discussion
No community discussion yet for this question.