Visitor Pattern with Real Time Example
Scenarios in which visitor pattern is used: Engineers use Visitor pattern in scenarios in which we need to extend a functionality to classes that implement an interface. But we don’t want to make any modification to the classes. Creating extension method can be a solution to the same. But at intermediate level, the extension method …