J
Jorge Varas
Let's say that you have:
class A
{
T DoSomething<T>() where T : class, new()
{
T ThisObj = new T();
// Do something usefull...
return ThisObj;
}
void StartHere(Type type)
{
// And here is the problem
DoSomething<type>();
}
}
Any Ideas on how to call a generic function like 'DoSomething' when the calling function got the type as a parameter, not as a type parameter?
Jorge Varas
class A
{
T DoSomething<T>() where T : class, new()
{
T ThisObj = new T();
// Do something usefull...
return ThisObj;
}
void StartHere(Type type)
{
// And here is the problem
DoSomething<type>();
}
}
Any Ideas on how to call a generic function like 'DoSomething' when the calling function got the type as a parameter, not as a type parameter?
Jorge Varas