title: Is it possible to set private property via reflection?
body: <p>Can I set a private property via reflection?</p>
  
  <pre><code>public abstract class Entity
  {
      private int _id;
      private DateTime? _createdOn;
      public virtual T Id
      {
          get { return _id; }
          private set { ChangePropertyAndNotify(ref _id, value, x =&gt; Id); }
      }
      public virtual DateTime? CreatedOn
      {
          get { return _createdOn; }
          private set { ChangePropertyAndNotify(ref _createdOn, value, x =&gt; CreatedOn); }
      }
  }
  </code></pre>
  
  <p>I've tried the following and it does not work, where <code>t</code> represents a type of <code>Entity</code>:</p>
  
  <pre><code>var t = typeof(Entity);
  var mi = t.GetMethod("set_CreatedOn", BindingFlags.Instance | BindingFlags.NonPublic);
  </code></pre>
  
  <p>I guess I can do this but I can't work it out.</p>