title: Getting a value from dynamic List
body: <p>I have a list of dynamic and I am trying to get value from a property using reflection. The code goes like this:</p>
  
  <pre><code>var list = new List&lt;Employee&gt;();
  list.Add(new Employee {FirstName="Krishna"});
  IEnumerable&lt;dynamic&gt; data = list;
  </code></pre>
  
  <p>In Employee, lets say I have property called FirstName,</p>
  
  <pre><code> Type type = data.GetType().GetGenericArguments()[0];
   PropertyInfo property = type.GetProperty( "FirstName" );
  </code></pre>
  
  <p>Now, how do I get value from this property? I tried:</p>
  
  <pre><code> object value = property.GetValue( data, null ); 
  </code></pre>
  
  <p>But it gives me error saying object doesnot match target type.</p>