Exemple #1
0
        public static void TestGenericInterfaceWithNestedTypeParameters()
        {
            var b = new BugTest <string>();

            b._MyThing = new MyThing <string>();

            Assert.AreEqual("MyThing", b.DoStuff());


            var m = new DecimalBugTest <decimal>();

            m._MyThing = new DecimalThing <decimal>()
            {
                A = new V2 <decimal, decimal>()
                {
                    a = 1.1m, b = 2.2m
                },
                B = new V2 <decimal, long>()
                {
                    a = 3.3m, b = 4L
                }
            };

            Assert.AreEqual("1.1|2.2|3.3|4", m.DoStuff());
        }
        public static void GenericMethodTest5()
        {
            BugTest test = new BugTest();

            test.Test();
        }