Serialize a Dictionary(Of TKey, Of TValue)

  • Thread starter Thread starter Art
  • Start date Start date
A

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.
 
Art said:
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
 
Back
Top