コード例 #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();
        }
コード例 #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();
        }