Here is my object
[Serializable()]
public class PersistentObject
{
public virtual int ID {
get { return id; }
protec
Unfortunately, no. XmlSerializer has some things that are... irritating. This is one of them. Options:
DataContractSerializer (which supports protected etc, but doesn't offer full xml control)[XmlIgnore] - nothing wrong with itIXmlSerializable - hard work and very easy to get wrongprotected method to set the valueXmlSerializer constructor that lets you specify everything at runtime; lots of work/maintenance, and you need to manually cache the serializer (otherwise it creates lots of dynamic assemblies)