Link to home
Start Free TrialLog in
Avatar of yaron89
yaron89

asked on

Serialiization of an object that inherit from a tabpage object.

In my winform app. I have to serialize an object that inherit from TabPage object.
I got a message that I have to mark the TabPage as [Serializable] too.
How can I do this?
[Serializable] 
    partial class myTabPage : TabPage
    {
        public string ContainerTableTag;
        public bool showAlways;
        public bool showForAllChildren;
        public bool showForChild;
       
        public myTabPage()
        {
           InitializeComponent();           
        }
    }

Open in new window

Avatar of DaveJellison
DaveJellison
Flag of United States of America image

What information do you need to serialize inside of the tabpage control itself? Do you know this before-hand or only at runtime?
Avatar of yaron89
yaron89

ASKER

Hi,
The information I need is some boolean and strings varaibles in myTabPage.
The values accepted only at runtime.
I can try to  seperate the varaibles to another class, however I would like to know if there ia an option to serialize the control as it is, or not.
Thanks.
 
ASKER CERTIFIED SOLUTION
Avatar of DaveJellison
DaveJellison
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial