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.
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.
Type t=Type.GetType("System.Collections.Generic.List`1[System.Net.Sockets.Socket]");
object o=Activator.CreateInstance(t);