Hi,
I have a class 'A' and a class 'B' that inherits class 'A' and extends it with some more fields.
Having an object 'a' of type 'A', how can I create an object 'b' of type 'B' that contains all data that object 'a' contained?
I have tried a.MemberwiseClone() but that only gives me another type 'A' object.
And I cannot cast 'A' into 'B' since the inheritance relationship only allows the opposite cast.
What is the right way to do this?
Thanks.