views:

49

answers:

2

Presuming I have the strings "List" and "Socket," how would I go about creating a List<Socket>?

The answer I need will work just as well for Queue and XmlNodeList, not to mention MyCustomGeneric with MyCustomClass.

A: 
Type t=Type.GetType("System.Collections.Generic.List`1[System.Net.Sockets.Socket]");
object o=Activator.CreateInstance(t);
chris