J
Jeff.Boeker
Hello,
I have a base class that is serializable and a derived class that is
not. I want to pass the base class object to an external function that
requires a serializable object. How can I cleanly create a new
instance of the base class that copies the base class from the derived
object. I can use brute force and create a new function that copies
each member variable but I assume there's a better way.
CDerived derived;
CBase base = derived as CBase;
obj.Serialize(base); ->error not serializable
Thanks,
Jeff
I have a base class that is serializable and a derived class that is
not. I want to pass the base class object to an external function that
requires a serializable object. How can I cleanly create a new
instance of the base class that copies the base class from the derived
object. I can use brute force and create a new function that copies
each member variable but I assume there's a better way.
CDerived derived;
CBase base = derived as CBase;
obj.Serialize(base); ->error not serializable
Thanks,
Jeff