Get propertyinfo value
<p>Im trying to get the value from a <code>PropertyInfo[]</code>, but i cant get it to work:</p>

<pre><code>foreach (var propertyInfo in foo.GetType().GetProperties())
{
      var value = propertyInfo.GetValue(this, null);
}
</code></pre>

<p>Exception: <code>Object does not match target type.</code></p>

<p>Isnt this how its supposed to be done?</p>

<p>Thanks</p>
