using System; public class Foo[T] where T : A { public Test ( t : T) : void { Console.WriteLine (t); Console.WriteLine (t.GetType ()); t.Hello (); } } public class A { public Hello () : void { Console.WriteLine ("Hello World"); } } public class B : A { } class X { static Main () : void { mutable foo = Foo (); foo.Test ( B ()); } } /* BEGIN-OUTPUT B B Hello World END-OUTPUT */