Explanation/Reference:
Explanation:
As of .NET 3.5 SP1, you don't haveto add data contract or data member attributes anymore - if you don't then the data contract serializer will serialize all public properties on your class, just like the XML serializer would.
HOWEVER: by not adding those attributes, you lose a lot of useful capabilities:
without [DataContract], you cannot define an XML namespace for your data to live in

without [DataMember], you cannot serialize non-public properties or fields

without [DataMember], you cannot define an order of serialization (Order=) andthe DCS will serialize all

properties alphabetically
without [DataMember], you cannot define a different name for your property (Name=)

without [DataMember], you cannot define things like IsRequired= or other useful attributes

without [DataMember], you cannot leave out certain public properties - all public properties will be

serialized by the DCS
References: http://stackoverflow.com/questions/4836683/when-to-use-datacontract-and-datamember- attributes