You are developing 3-layered web application. You have to use log4Net to log exception,information and debug information. The application has class named LogException which contains following method
Public static void LogError(Exception ex).
As per the business requirements, you need to re-throw the original exception including the entire stack trace information and log all kind of exception using LogError method. Which of the following code base you are going to use?

 Posted by Rajkatie on 6/9/2016 | Category: C# Interview questions | Views: 10464 | Points: 40
Select from following answers:
  1. Catch(Exception ex) { LogException. LogError (ex); throw;}
  2. Catch { var cx = new Exception() throw cx;}
  3. Catch { LogException. LogError(new Exception()); throw;}
  4. All Above

Show Correct Answer


Source: https://msdn.microsoft.com | | Alert Moderator 

Comments or Responses

Login to post response