title: Dynamically creating a new instance of IList's type
body: <p>My application is processing IList's. ILists of different user defined types. I'm thinking that i can use reflection to to see what type of object the IList contains and then create a new instance of that type and subsequently add that to the IList itself?</p>
  
  <p>So at any one time I might be processing </p>
  
  <pre><code>IList&lt;Customer&gt; l;
  </code></pre>
  
  <p>and I'd like to create a new instance of Customer </p>
  
  <pre><code>Customer c = new Customer(0, "None")
  </code></pre>
  
  <p>and then add that onto the list </p>
  
  <pre><code>l.Add(c);
  </code></pre>
  
  <p>Obviously doing this dynamically at run-time is the crux of the problem. Hope somebody can give me some pointers. Thanks brendan</p>