Which of the following combinations of the exception handler should she use to accomplish the task?

Posted by: Pdfprep Category: GSSP-.NET Tags: , ,

Sophia works as a Software Developer for BlueWell Inc. She creates a component, named MyComp, using Visual Studio .NET. MyComp includes a method named MyMethod1, which is used to process user requests. MyMethod1 calls a private method, named MyMethod2. Sophia wants to ensure that if an error occurs during the execution, the exceptions encountered by MyMethod2 are caught and passed on to MyMethod1 for exception handling.

Which of the following combinations of the exception handler should she use to accomplish the task?
A . try, catch, and throw
B . catch, finally, and throw
C . try, catch, and finally
D . try and throw

Answer: A

Leave a Reply

Your email address will not be published.