I need a suggestion regarding Object reference issue. I got this message ExceptionMessage: Object reference not set to an instance of an object. (because some null object) I am printing the stack trace when an error occurs:
Exception systemException = lastError.GetBaseException();
By using ex.Message I am able to get the method where exception has occurred but I am not getting any information regarding the line (of that method) where exception occurred. I need to know at which line object reference has occurred and which object was null when this exception came.