Serializing System.Version type

  • Thread starter Thread starter Soheil
  • Start date Start date
S

Soheil

Hi,

Why when System.Version type is serialized, none of its Major, Minor, etc
properties are serialized?

I get <MyVersion /> when i serialize an instance of System.Version using
XmlSerializer!


Thanks in advance
 
XML Serializer won't serialize ReadOnly properties. This is because on the
other end, it needs to put the values back into the property using the
property mutator (Set).
The binary serializer, on the other hand, works by extracting and setting
the values directly to the object's fields, so it would be able to serialize
this object properly.

-Rob Teixeira [MVP]
 
Back
Top