示例#1
0
        public static void Start()
        {
            var obj = new MoveableOject();

            ((ILeft)obj).Move();
            ((IRight)obj).Move();
        }
        static void Main(string[] args)
        {
            MoveableOject moveableOject = new MoveableOject();

            (moveableOject as IRight).Move();

            (moveableOject as ILeft).Move();

            Console.Read();
        }