c# - Calling static method on a generic class -
this question has answer here: how access static methods of generic types 3 answers i have generic class program static method below: class program { public static void main() { console.writeline("hi program"); console.readline(); } } when try access static main method inside generic class program1 below: class program1<t> : program t : program { public static void check() { t.main(); } } i error : 't' 'type parameter', not valid in given context however if use public static void check() { program.main(); } everything runs fine. can please explain mistake might committing? when program1 : program , telling program1 instances not of type program1, of type program, because inherits it. but when program1<t> , telling pr...