Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            FooBar fb = new FooBar();
            fb.SomeMethod();

            IFoo ifoo = fb as IFoo;
            ifoo.SomeMethod();

            IBar ibar = fb as IBar;
            ibar.SomeMethod();

            Console.WriteLine("\nPress Enter key to continue...");
            Console.ReadLine();
        }
Ejemplo n.º 2
0
        static void Main(string[] args)
        {
            FooBar fb = new FooBar();

            fb.SomeMethod();

            IFoo ifoo = fb as IFoo;

            ifoo.SomeMethod();

            IBar ibar = fb as IBar;

            ibar.SomeMethod();

            Console.ReadLine();
        }
Ejemplo n.º 3
0
        static void Main(string[] args)
        {
            FooBar fb = new FooBar();

            fb.SomeMethod();

            IFoo ifoo = fb as IFoo;

            ifoo.SomeMethod();

            IBar ibar = fb as IBar;

            ibar.SomeMethod();

            Console.WriteLine("\nPress Enter key to continue...");
            Console.ReadLine();
        }