title: .NET Reflection set private property
body: <p>If you have a property defined like this:</p>
  
  <pre><code>private DateTime modifiedOn;
  public DateTime ModifiedOn
  {
      get { return modifiedOn; }
  }
  </code></pre>
  
  <p>How do you set it to a certain value with Reflection?</p>
  
  <p>I've tried both:</p>
  
  <pre><code>dto.GetType().GetProperty("ModifiedOn").SetValue(dto, modifiedOn, null);
  </code></pre>
  
  <p>and</p>
  
  <pre><code>dto.GetType().GetProperty("modifiedOn").SetValue(dto, modifiedOn, null);
  </code></pre>
  
  <p>but without any success. Sorry if this is a stupid question but it's the first time I'm using Reflection with C#.NET.</p>