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?
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();
}
}
What information do you need to serialize inside of the tabpage control itself? Do you know this before-hand or only at runtime?
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.
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you.
I also found this:
http://www.switchonthecode.com/tutorials/csharp-tutorial-serialize-objects-to-a-file
I also found this:
http://www.switchonthecode.com/tutorials/csharp-tutorial-serialize-objects-to-a-file