I am trying to create a list of a certain type.
I want to use the List notation but all I know is a \"System.Type\"
The type a have is variable. How can I cr
You could use Reflections, here is a sample:
Type mytype = typeof (int); Type listGenericType = typeof (List<>); Type list = listGenericType.MakeGenericType(mytype); ConstructorInfo ci = list.GetConstructor(new Type[] {}); List listInt = (List)ci.Invoke(new object[] {});