title: How to use MethodInfo.Invoke to set property value?
body: <p>I have a class with a property Value like this:</p>
  
  <pre><code>public class MyClass {
     public property var Value { get; set; }
     ....
  }
  </code></pre>
  
  <p>I want to use MethodInfo.Invoke() to set property value. Here are some codes:</p>
  
  <pre><code>object o;
  // use CodeDom to get instance of a dynamically built MyClass to o, codes omitted
  Type type = o.GetType();
  MethodInfo mi = type.GetProperty("Value");
  mi.Invoke(o, new object[] {23}); // Set Value to 23?
  </code></pre>
  
  <p>I cannot access to my work VS right now. My question is how to set Value with a integer value such as 23?</p>