using System; namespace Test { class MainClass { public static int Main () { if (!Test_1 (new Derived ())) return 1; if (!Test_2 (new S ())) return 2; return 0; } static bool Test_1 (Templated template) { return template is Derived; } static bool Test_2 (IA arg) { return arg is S; } } public abstract class Templated { } public class Derived : Templated { } public interface IA { } public struct S : IA { } }