How does DataContractSerializer write to private fields?
- by Eric
I understand how XMLSerializer could work by using reflection to figure out what public read/write fields or properties it should be using to serialize or de-serialize XML. Yet XMLSerializer requires that the fields be public and read/write.
However, DataContractSerializer is able to read or write to or from completely private fields in a class.…