G
Guest
I extended the class TreeNode to add some properties of my liking. Anyway,
no problems there, I can add my derived TreeNode into TreeNodeCollections and
use the properties etc. However, when I serialize a class containing my new
TreeNode, it doesn't seem to save all the properties back up the inheritance
chain. The class that is getting serialized has one member to be serialized,
a Dictionary<string, List<IOTreeNode>> where IOTreeNode is the TreeNode
derived class. The List generally has 3 to 5 IOTreeNodes in it. The extra
properties of those are fine. The problem is (totally assuming) that the
Nodes collection of the IOTreeNode is a TreeNodeCollection. So I think the
serializer is serializing TreeNodes inside the Nodes collection even though
the collection contains IOTreeNodes. I can't override the Nodes, and I can't
create a derived TreeNodeCollection.
Any pointers/ideas?
Thanks.
no problems there, I can add my derived TreeNode into TreeNodeCollections and
use the properties etc. However, when I serialize a class containing my new
TreeNode, it doesn't seem to save all the properties back up the inheritance
chain. The class that is getting serialized has one member to be serialized,
a Dictionary<string, List<IOTreeNode>> where IOTreeNode is the TreeNode
derived class. The List generally has 3 to 5 IOTreeNodes in it. The extra
properties of those are fine. The problem is (totally assuming) that the
Nodes collection of the IOTreeNode is a TreeNodeCollection. So I think the
serializer is serializing TreeNodes inside the Nodes collection even though
the collection contains IOTreeNodes. I can't override the Nodes, and I can't
create a derived TreeNodeCollection.
Any pointers/ideas?
Thanks.