Dynamically creating a new instance of IList's type
问题 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? So at any one time I might be processing IList<Customer> l; and I'd like to create a new instance of Customer Customer c = new Customer(0, "None") and then add that onto the list l.Add(c); Obviously doing this dynamically at run-time is the