I cannot find a way to use a first-class Type object (System.Type instance) as a Type Parameter in a generic construction in C# 3.0 / .NET 3.5. Below is a simplified example of what I want to do:
public void test()
{
Type someType = getSomeType(); // get some System.Type object
MyGeneric<someType> obj = new MyGeneric<someType>(); // won't compile
}
Is there any way to use the someType object as a type parameter for a generic?