I tried to use type parameter to call static method but got compile error
'T' is a 'type parameter', which is not valid in the given context.
Why this is not allowed ?
Should I really use a lot longer ModelGenericBase<T>.test1() ?
Andrus.
class VirtualGrid<T>
where T : ModelGenericBase<T{
void test() {
//'T' is a 'type parameter', which is not valid in the given context
T.test1();
}
}
class ModelGenericBase<T{
public static void test1() {
}
}