public override void VisitConcreteElementB(ConcreteElementB concreteElementB) { Console.WriteLine($"{concreteElementB.GetType().Name}被{this.GetType().Name}访问"); }
public override void Visit(ConcreteElementB elementB) { //元素B的代码 }
public abstract void VisitConcreteElementB(ConcreteElementB concreteElementB);
public abstract void Visit(ConcreteElementB elementB);