Пример #1
0
        public static void Run()
        {
            var derived       = new Derived <string>();
            var derivedAsBase = (Base <string, string>)derived;

            if (derivedAsBase.Do() != 42)
            {
                throw new Exception();
            }

            if (derived.Cast("Hello") != "Hello")
            {
                throw new Exception();
            }
        }