Even if it is not possible to serialize private properties, you can serialize properties using an internal setter, for example:
public string Foo { get; internal set; }
To do this, you need to pre-generate the serializing assembly using sgen.exe and declare this assembly as a friend:
[assembly:InternalsVisibleTo("MyAssembly.XmlSerializers")]
Thomas levesque
source share