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