views:

162

answers:

1

What is the purpose of the PropertySpecified pattern used by XML Serialization ?
What problem does it tryto solve ?

+1  A: 

It tries to solve the problem that int float and so on cannot be null, so it has no other way to signal whether the attribute/element exists in the XML file or not.

It was really only useful in .NET 1.x, since in .NET 2 you can just use Nullable<T> (e.g. int?) instead.

Dean Harding
read about it here: http://msdn.microsoft.com/en-us/library/system.xml.serialization.xmlserializer.aspx
Cheeso