Say that I have an object a, which is of class A:
abstract class A {
public abstract SomeType SomeMethod(int i)
public abstract SomeType SomeOtherMethod()
}
Can I/how do I create an object b, of class B - which, at run time, can take any object (say A), and wrap it:
class B {
public void Wrap(object someObject) {}
}
such that i can write the following code:
var a = Factory.BuildAn<A>();
var b = new B();
b.Wrap(a);
b.SomeMethod(1);