In C# I want to create a list based on a dynamic value type, e.g.:
void Function1() {
TypeBuilder tb = .... // tb is a value type
...
Type myType = tb.CreateType();
List<myType> myTable = new List<myType>();
}
void Function2(Type myType)
{
List<myType> myTable = new List<myType>();
}
This won't comple because List<> wants a staticly defined type name. Is there any way to work around this?