title: Convert Expando Object based on runtime type?
body: <p>I have something like </p>
  
  <pre><code>Car:Vehicle {}   
  Truck:Vehicle {}
  </code></pre>
  
  <p>Database ORM return list that could contain either.  Fetch &lt; Vehicle > will lose sub class information.  If I fetch object or dynamic, it will return list of ExpandoObject.  Due the the underline framework restriction, I can't pass in generic T, only strings.  So I have something like this:</p>
  
  <pre><code>Type type = Type.GetType("Car")
  </code></pre>
  
  <p>I can also create a typed List&lt; Car > like so</p>
  
  <pre><code>var genericListType = typeof(List&lt;&gt;);
  var specificListType = genericListType.MakeGenericType(type);
  var list = Activator.CreateInstance(specificListType) as IList;
  </code></pre>
  
  <p>Not sure where to go from here.  Reflection seems not very efficient, also can't add to IList.  Any hint?  Thanks.</p>