title: Getting baseclass property value using reflection - base.Property as opposed to this.Property
body: <p>I want to know if something like this is possible: I've overriden a property of a base class, which is auto-implemented. I've supplied logic in the override to resolve "missing" properties against default settings.</p>
  
  <p>Now, I want to use reflection to check whether the default value is used or some "actual" value. In other words, I need to check if <code>base.Property</code> is null, but by using reflection. This doesn't work, it simply gets the sub-class value (which is resolved against defaults, so not null).</p>
  
  <pre><code>var property = this.GetType().GetProperty(e.PropertyName);
  if(property.GetValue(this, null) == null))
      OnPropertyChanged(e.PropertyName);
  </code></pre>
  
  <p>Also tried:</p>
  
  <pre><code>var property = this.GetType().BaseType.GetProperty(e.PropertyName);
  if(property.GetValue(this, null) == null))
      OnPropertyChanged(e.PropertyName);
  </code></pre>
  
  <p>Is it possible using reflection to access the base class value?</p>
  
  <p>UPDATE:</p>
  
  <p>Following advice from comments, I tried the following, just for kicks.</p>
  
  <pre><code>var method1 = this.GetType().BaseType.GetMethods().First(x =&gt; x.Name.Contains(e.PropertyName));
  var method = this.GetType().BaseType.GetProperty(e.PropertyName).GetGetMethod();
  var methodValue = method1.Invoke(this, null);
  </code></pre>
  
  <p>Both of these still return the "derived" value, while at the same time <code>base.Property</code> returns null.</p>