title: Type conversion issue when setting property through reflection
body: <p>We have a property of type <code>long?</code> that gets filled with an <code>int</code>.</p>
  
  <p>This works fine when i just set the property directly <code>obj.Value = v;</code> but when i try and set the property through reflection <code>info.SetValue(obj, v, null);</code> it gives me a the following exception:</p>
  
  <blockquote>
    <p>Object of type 'System.Int32' cannot be converted to type 'System.Nullable`1[System.Int64]'.</p>
  </blockquote>
  
  <p>This is a simplified scenario:</p>
  
  <pre><code>    class TestClass
      {
          public long? Value { get; set; }
      }
  
      [TestMethod]
      public void TestMethod2()
      {
          TestClass obj = new TestClass();
          Type t = obj.GetType();
  
          PropertyInfo info = t.GetProperty("Value");
          int v = 1;
  
          // This works
          obj.Value = v;
  
          // This does not work
          info.SetValue(obj, v, null);
      }
  </code></pre>
  
  <p>Why does it not work when setting the property through <code>reflection</code> while it works when setting the property directly?</p>