static public void Main() { ObjectStructure objectStructur = new ObjectStructure(); ConcreteVisitorA concreteVisitorA = new ConcreteVisitorA(); ConcreteVisitorB concreteVisitorB = new ConcreteVisitorB(); objectStructur.VisitElementX(concreteVisitorA); objectStructur.VisitElementX(concreteVisitorB); objectStructur.VisitElementY(concreteVisitorA); objectStructur.VisitElementY(concreteVisitorB); }