I want to do something like the code below.
public IList SomeMethod(Type t)
{
List<t> list = new List<t>;
return list;
}
This, of course, does not work. Is there some other way I can dynamically set the type parameter of a generic class using a reference to a Type instance?
Try this: