Home All Groups Group Topic Archive Search About

Serialize a Dictionary(Of TKey, Of TValue)

Author
7 Jul 2009 2:24 PM
Art
I'd like to serialize, to an XML file, a dictionary.  I've not done much with
VB.net for a year or so, and never did much with serialization or XML.  I've
got version VS 2008.  Can anyone give me an example -- I seem to be missing
something.  Oh, then I'd like to deserialize it.  I have tried to follow some
of the documentation, but I think there are too many holes in my knowledge to
follow it properly.

I have been able to serialize some fields, but now I would like to build a
collection and then serialize the whole thing.

Thanks for any help.

Author
7 Jul 2009 3:25 PM
Family Tree Mike
"Art" wrote:

> I'd like to serialize, to an XML file, a dictionary.  I've not done much with
> VB.net for a year or so, and never did much with serialization or XML.  I've
> got version VS 2008.  Can anyone give me an example -- I seem to be missing
> something.  Oh, then I'd like to deserialize it.  I have tried to follow some
> of the documentation, but I think there are too many holes in my knowledge to
> follow it properly.
>
> I have been able to serialize some fields, but now I would like to build a
> collection and then serialize the whole thing.
>
> Thanks for any help.

It might not be your fault.  Dictionaries are not serializable out of the
box.  Here is an article describing an option:
http://blogs.msdn.com/psheill/archive/2005/04/09/406823.aspx. 

Mike

Bookmark and Share

Post Thread options