|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Xml SerializationI have a class derived from System.Collections.CollectionBase. How do I do
serialization for it? If two or more instances of class A share an instance of class B in my object hierachy, how do I serialize them so that the instance of class B just be serialized once? How do de-serialize it back? XML Serialization in .Net is really not hard to do. The basic class you use
is the XmlSerializer for both serialization and deserialization. Many classes can be serialized without any changes. Collections fall into that category. See the documentation fo the XmlSerializer class, which has quite a bit of information about the topic: http://msdn2.microsoft.com/en-us/library/system.xml.serialization.xmlserializer.aspx -- Show quoteHTH, Kevin Spencer Microsoft MVP Professional Chicken Salad Alchemist What You Seek Is What You Get. "Roy" <R**@discussions.microsoft.com> wrote in message news:D927D6D4-2A37-48BD-AA22-462A48552BAF@microsoft.com... >I have a class derived from System.Collections.CollectionBase. How do I do > serialization for it? > > If two or more instances of class A share an instance of class B in my > object hierachy, how do I serialize them so that the instance of class B > just > be serialized once? How do de-serialize it back? |
|||||||||||||||||||||||