예제 #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();
        }
예제 #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();
        }
        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();
        }