Murali Poola
Why not private variables serialized with xmlserializer?
By Murali Poola in .NET on Apr 23 2012
  • Murali Poola
    May, 2012 23

    XMLSerializer is introduced in .NET 1.0 and specially designed for working with ASMX services. As per the design, it requires to serialize only public properties.Also, XMLSerializer depends on the serialization assembly generated during run-time. XMLSerializer uses this runtime-generated assembly to serialize types. Doesn't use reflection. Hence, private variables are not serialized.

    • 0
  • Anitha
    Apr, 2012 30

    You cannot serialize private members using XmlSerializer unless your class implements the interface IXmlSerializable.

    • 0


Most Popular Job Functions


MOST LIKED QUESTIONS