using System; public class Test { class Base { } class ClassA : Base { } class ClassB : Base { } class OtherBase { } class ClassC : OtherBase { } static void Foo() where T : Base { var type = typeof(T); Console.WriteLine(type.Name); } static void Foo() where T1 : Base where T2 : Base { Foo(); Foo(); } public static void Main() { Foo(); Foo(); // Foo(); // gdy odkomentujemy nie skompiluje się ze względu na generic constraint } }