When I XML-serialize my DateTime field (which has the value from a datepicker), the date is always serialized as
0001-01-01T00:00:00
i.e. 1st January 1AD. Why is this? Also, when I try to deserialize the XML, I get this error:
startIndex cannot be larger than length of string.
Parameter name: startIndex.
However, when I edit the XML manually, deserialization goes just fine for years 1000-9999, but not for years <1000 ?
The DateTime property has the [XmlElement], just like all other fields that get serialized properly, and the rest of the code appears to be ok. Thanks in advance!