title: Checking if property exists when external library is not backward compatible
body: <p>I am trying to check if a property exists in a 3rd party dll (for backward compatibility) before trying to access, why does the <code>if</code> statement returns true and then fail with exception <code>Method not found: 'Boolean Shared.Models.Account.get_EnsureTextField()'</code> when I access the property?</p>
  
  <pre><code>var type = am.account.GetType(); //account is of type class Account
  
  //See if Account does not have property EnsureTextField
  if(type.GetProperty("EnsureTextField") != null)
  {
    cbEnsureTextField.Checked = am.account.EnsureTextField; //Exception thrown
  } 
  </code></pre>
  
  <p>Note: code compiles fine as at compile time version that indeed has <code>EnsureTextField</code> is used, the issue is that code fails at run-time (when different version of the same assembly is loaded) even if I have <code>if</code> check which based on my understanding should prevent the exception.</p>