title: Deferred type inference for inherited class method
body: <p>What I'm trying to do, without success, is a method on a base class that, using reflection, would update properties defined into inherited classes. So, starting from a specific method like this</p>
  
  <pre><code>/** fill the item from a xml node
   */
  public TblItem FromXML (XmlNode itemNode)
  {
      foreach (XmlNode itemField in itemNode) {
          Type myType = this.GetType ();
          PropertyInfo myPropInfo = myType.GetProperty (itemField.Name);
          if (myPropInfo != null) {
              myPropInfo.SetValue (this, Convert.ChangeType (itemField.InnerText, myPropInfo.PropertyType), null);
          } else {            
              throw new MissingFieldException (string.Format ("[Fieldname]wrong fieldname: {0}", itemField.Name));
          }
      }
      return this;
  }
  </code></pre>
  
  <p>I need it to be defined in a base class called i.e. <strong>TblBase</strong>, containing no properties at all, and being used seamlessly in all the derived classes, i.e. <strong>TblDerived1: TblBase</strong> etc. in which there are different properties defined for each of them, so I'm here asking: is there a way to do that or it is just a dream of my dirty mind?
  BTW, this is how I need to use this stuff:</p>
  
  <pre><code>    xmlDoc.Load (XMLDbPath); 
      XmlNodeList itemNodes = xmlDoc.SelectNodes (nodes2select);
      //Tblitem inherits TblBase
      TblItem ti = new TblItem ();
      foreach (XmlNode itemNode in itemNodes) {
          print (((TblItem)ti).FromXML (itemNode).ToString ());
      }
  </code></pre>