public static void Main(string[] args) { ICarElement car = new Car(); car.Accept(new CarElementPrintVisitor()); car.Accept(new CarElementDoVisitor()); }
public void Visit(Car car) { Console.WriteLine("Visiting car"); }
public void Visit(Car car) { Console.WriteLine("Starting my car"); }