Exemplo n.º 1
0
        public static void Main(string[] args)
        {
            MyClass imc = new MyClass();

            imc.ID = 1;
            imc.name = "mc1";

            object omc = imc;
            MyClass mc = (MyClass)omc;

            mc.MyFunc();
        }
Exemplo n.º 2
0
        public static void Main(string[] args)
        {
            MyClass mc = new MyClass();
            mc.ID = 1;
            mc.name = "mc1";
            mc.value = "mcvalue1";

            IClass imc = mc;
            MyClass nmc = (MyClass)imc;

            nmc.MyFunc();
        }