title: Is there a way to set properties on struct instances using reflection?
body: <p>I'm trying to write some code that sets a property on a struct (important that it's a property on a struct) and it's failing:</p>
  
  <pre><code>System.Drawing.Rectangle rectangle = new System.Drawing.Rectangle();
  PropertyInfo propertyInfo = typeof(System.Drawing.Rectangle).GetProperty("Height");
  propertyInfo.SetValue(rectangle, 5, null);
  </code></pre>
  
  <p>The Height value (as reported by the debugger) never gets set to anything - it stays at the default value of 0.</p>
  
  <p>I have done plenty of reflection on classes before and this has worked fine.  Also, I know that when dealing with structs, you need to use FieldInfo.SetValueDirect if setting a field, but I don't know of an equivalent for PropertyInfo.</p>