xml serialize instance of class

J

John A Grandy

I would like to xml serialize instances of a class solely for the purpose of
md5 hashing the result and naming data-files with the md5 hash so that there
is a 1:1 correspondence between a data-file and in instance of my class.

My class contains references to instances of other classes.

How would I go about implementing this ?
 
J

John A Grandy

I'm not having luck serializing public properties that return instances of
other classes, or strongly-types lists of instances of other classes.

How to achieve recursive serialization ?
 
M

Marc Gravell

What happens? Do you get an exception? Those types must also be
serializable. Note that XmlSerializer is a *tree* serializer; it won't
like recursive graphs. DataContractSerializer can support this, but
gives different layout.

Marc
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top