예제 #1
0
        public void Test()
        {
            var characters = new List <ICharacter>
            {
                new CatInTheHat(),
                new Fish(),
                new Thing()
            };

            var visitor = new FishVisitor();

            foreach (var character in characters)
            {
                visitor.Visit((dynamic)character);
            }
        }
예제 #2
0
        public void Test()
        {
            var characters = new List<ICharacter>
            {
                new CatInTheHat(),
                new Fish(),
                new Thing()
            };

            var visitor = new FishVisitor();

            foreach (var character in characters)
            {
                visitor.Visit((dynamic)character);
            }
        }