예제 #1
0
        public static void TestI5()
        {
            var         a  = new C8();
            I5 <int>    i1 = a;
            I5 <string> i2 = a;

            Assert.AreEqual(1, i1.Foo());
            Assert.AreEqual("test", i2.Foo());
        }
예제 #2
0
        public static void TestI6()
        {
            var         a  = new C9 <int, string>();
            I5 <int>    i1 = a;
            I6 <string> i2 = a;

            i1.Foo();
            Assert.AreEqual("I5", a.flag);

            i2.Foo();
            Assert.AreEqual("I6", a.flag);
        }