How can I instantiate the type T inside my InstantiateType method below?
InstantiateType
I\'m getting the error: \'T\' is a \'type parameter\' but is u
Couple of ways.
Without specifying the type must have a constructor:
T obj = default(T); //which will produce null for reference types
With a constructor:
T obj = new T();
But this requires the clause:
where T : new()