Say i have two generic methods:
int GetValue<T>() where T: unmanaged
{}
int GetAnotherValue<T>()
{}
I need to forward a call to one of those methods like this:
void Init<T>()
{
int i;
//here is my problem
if( T is unmanaged)
i = GetValue<T>();
else
i = GetAnotherValue<T>();
}
I do not figure how to dispatch the call based on the generic type T. Can someone help me? Thanks.