C
Christopher Pragash
I have two subclass deriving from a common base class. The base class
exposes two shared functions for serialization and deserialization in XML
format and some other methods that are overrided by the derived classes. I
want to be able to serialize and deserialize the derived classes through the
methods in the base class, without explicitly passing the type of the
object. I want to determine at runtime the type of the derived class calling
the function and Serialize and deserialize based on that type. How do I
achieve this?
For example:
The client will call ObjA.Serialize(), where objA is a derived class and
Serialize is a method implemented in the parent class. How do I determine
the type of the derived class calling the Function? Is there an inbuilt
mechanism, like Reflection etc..., that could help in this mechanism?
Thanks in advance,
regards,
Chris
exposes two shared functions for serialization and deserialization in XML
format and some other methods that are overrided by the derived classes. I
want to be able to serialize and deserialize the derived classes through the
methods in the base class, without explicitly passing the type of the
object. I want to determine at runtime the type of the derived class calling
the function and Serialize and deserialize based on that type. How do I
achieve this?
For example:
The client will call ObjA.Serialize(), where objA is a derived class and
Serialize is a method implemented in the parent class. How do I determine
the type of the derived class calling the Function? Is there an inbuilt
mechanism, like Reflection etc..., that could help in this mechanism?
Thanks in advance,
regards,
Chris