I have assembly A, A has two classes a and b.
A.a uses A.b in some of it’s methods.
In my assembly, B, I have two classes B.a and B.b.
B.a inherits from A.a and B.b inherits from A.b.
How would I get B.a to use B.b instead of A.b in the methods that use A.b, without having access to the source code?
Without having the source code for A, and that A doesn’t do anything fancy like use IoC to resolve A.b, you can’t. The dependency between A.a and A.b is set at compile time, and there is probably no easy way to intercept that.
If the methods from A.a that use A.b are virtual, then you can override them, and reproduce their functionality using B.b instead.