title: Using Reflection to get the field/property that is being null compared?
body: <p>How do I know the log the last property that is null?</p>
  
  <p>For example,</p>
  
  <pre><code>var a = "somevalue";
  ......
  ......
  if(a == null)
  {
     Log.Error(MethodBase.GetCurrentMethod().Name  + "Property : a is null");      
  
     //blah blah
  }
  </code></pre>
  
  <p>Like how I use the reflection to get the current method name, there should be some means by which I can log the latest local variables (or a property or fields)
  that is being compared ? I use, log4net by the way to log the errors.</p>
  
  <p>1) Is there any method to achieve this or should we manually log it?</p>
  
  <p>2) Is there any custom method that prints the class -> MethodName -> Propertyname(or FieldName) that is null?</p>
  
  <p>Thanks for your time in advance. </p>