|
-
Apr 4th, 2003, 02:54 PM
#1
Thread Starter
Fanatic Member
Serialization of a Custom Control
I am trying to persist a treeview in an xml file. I have read a bit about serialization, and think that this is the way to go.
So I have coded in a form that contains the treeview the following:
Dim serialize As XmlSerializer
serialize = NewXmlSerializer(GetType(CustomTreeViews.clsModifiableTreeView))
serialize.Serialize(Console.Out, Me.TreeView1())
Console.Out.WriteLine()
In this code I am simply trying to generate the XML to the console - then I will tackle saving it in an XML file later. I am getting an Invalid Operation Exception error on the second line "There was an error reflecting
'CustomTreeViews.clsModifiableTreeView'." It also states that you cannot perform the operation on an Interface.
How can I serialize my treeview? I thought you could serialize any object?
Thanks in advance.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|