// Type parameters with constraints: check whether we can invoke // things on the constrained type. using System; interface I { Hello () : void; } class J { public Foo () : void { Console.WriteLine ("Foo!"); } } class Stack[T] where T : J, I { public Test ( t : T) : void { t.Hello (); t.Foo (); } } class Test { } class X { static Main() : void { } } /* BEGIN-OUTPUT END-OUTPUT */