We have two similar hierarchies of classes sitting in two packages. The code is not ours, so we cannot change it. We have to process these hierarchies in a certain way. So far we end up duplicating lots of code. For instance we have two methods:
void process(pckg1.Client client){...}
and
void process(pckg2.Client client){...}
The bodies of the methods are identical except for the signature. The amount of the duplication is significant, but would not probably justify complexity of reflection. Is there a better way of doing this?
Thanks, Alex