Having generic types like this:
SomeType<T>
SomeType<T1, T2>
and only have the type of them:
Type type1 = typeof(SomeType<T>);
Type type2 = typeof(SomeType<T1, T2>);
How to get the type of T
from type1
and T1
and T2
from type2
?
Example:
Using typeof(SomeType<int>)
will only return SomeType´1
.
But I'm searching for a way to get the int
type, just as typeof(int)
will do.