Re: Serializing Dictionaries

Peter Ritchie <[email protected]>
Newsgroups gmane.comp.windows.devel.dotnet.clr
Message-ID <LISTSERV%[email protected]>
Do you mean IXmlSerializable?

You only need to implement IXmlSerializable if you want to override how
XmlSerializer serializers that type.  For example, if you can't completely
rehydrate a type based solely on the public fields/properties.

If you have a read/write public String field/property in your type,
XmlSerializer will serialize it if the type doesn't implement
IXmlSerializable.

On Thu, 13 Dec 2007 16:06:12 +0200, Brady Kelly
<[email protected]> wrote:

>I have an object graph in which most nodes contain generic Dictionary
>objects of other classes.  After looking at IXmlSerializer I can't decide
>whether to go this route, or just derive all my dictionaries from a
>serializable dictionary.  If I implement IXmlSerializer, I would then
>require each element of my dictionary to also implement this interface,
so I
>can call WriteXml on each one, but what happens if the dictionary element
is
>a built-in type, such as string?

===================================
This list is hosted by DevelopMentor®  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.