You are an enterprise application developer. You are reviewing a code segment in a Windows Forms application that invokes a Web service asynchronously. You discover that there is no implementation of exception handling. You need to implement exception handling for the application and log the error in the event log by using the minimum amount of coding effort.
What should you do?
A.
Enclose each method in a try/catch block.Log the error in the catch code block.
B.
Enclose each public method in a try/catch block.Log the error in the catch code block.
C.
Register a handler for the Application.ThreadException event.Log the error in the event handler.
D.
Register a handler for the AppDomain.UnhandledException event.Log the error in the event handler.