I have the following scenario:
I have three classes, let\'s call them A
, B
and C
. All they have in common is that they inherit fro
Well, you can do a visitor-like trick and use the following workaround:
Process(EntityProcessor ep)
in ISomeInterface
A
just as ep.ProcessEntity(this)
(and the same way in B
and C
)ProcessEntity(entity)
in your loop, just call entity.Process(this)
.(the method names are perhaps not cleanest, but you should get the idea)