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