title: value of that propertyObject does not match target type in c# (get property value with reflection)
body: <p>I have a class that contain this property.</p>
  
  <pre><code>public List&lt;string&gt; Messages { get; set; }
  </code></pre>
  
  <p>I want to read value of that property with using reflection.</p>
  
  <pre><code>List&lt;string&gt; messages = new List&lt;string&gt;();
  PropertyInfo prop = myType.GetProperty("Messages");
  var message = prop.GetValue(messages);
  </code></pre>
  
  <p>but I get this error : </p>
  
  <blockquote>
    <p>"Object does not match target type."</p>
  </blockquote>
  
  <p>I used this line: </p>
  
  <pre><code>var message = prop.GetValue(messages,null);
  </code></pre>
  
  <p>instead of </p>
  
  <pre><code>var message = prop.GetValue(messages);
  </code></pre>
  
  <p>but still I get the same error.</p>