I have a class MyForm : System.Windows.Forms.Form which I have marked as Serializable and I made implement ISerializable. It contains one instance of a class MyPanel : System.Windows.Forms.Panel, also implementing ISerializable. There is one more level of containment, as the MyPanel class contains one instance of a class MyPicBox : System.Windows.Forms.PictureBox (also implementing ISerializable).
So containment is illustrated by
MyForm > MyPanel > MyPicBox
The instance of MyPicBox contains a string and an Image which I want to serialize. How do I do this? I know the specifics that are common to a normal serialization process (like using a formatter). Its the hierarchal containment that is confusing me. The serialization process must start in MyForm, even though there is really nothing to serialize until we burrow down into MyPicBox. I cant just stick the [Serializable] attribute on each class and let if fly because they inherit from nonserializable base classes of the Framework. If you have any insight I would greatly appreciate your advice. Thanks!
Collin Lourie
So containment is illustrated by
MyForm > MyPanel > MyPicBox
The instance of MyPicBox contains a string and an Image which I want to serialize. How do I do this? I know the specifics that are common to a normal serialization process (like using a formatter). Its the hierarchal containment that is confusing me. The serialization process must start in MyForm, even though there is really nothing to serialize until we burrow down into MyPicBox. I cant just stick the [Serializable] attribute on each class and let if fly because they inherit from nonserializable base classes of the Framework. If you have any insight I would greatly appreciate your advice. Thanks!
Collin Lourie