HOTSPOT
You have an existing order processing system that accepts .xml files,
The following code shows an example of a properly formatted order in XML:
You create the following class that will be serialized:
For each of the following properties, select Yes if the property is serialized according to the defined
schema Otherwise, select No.

no no yes
0
0
no yes yes
0
2
answer is no no yes ,because orderdate has no attribute DataMember
1
0
orderdate doesnt need one. it is public
no yes yes
0
2
this reply made me smile
0
0
no no yes
1
0
As of .NET 3.5 SP1, WCF will happily serialize classes without any [DataContract] and [DataMember] attributes… but as soon as you start using one of those attributes, then this “default” behavior will stop working – as soon as you have a single [DataMember] in your class, from that point on, only those properties with this attribute will be serialized
0
0
yes no yes
The Id will be also serialized as long as it has the [DataMember] attribute.
Since “Name” member is not defined for the ID, by default, the CLR member name is used as the name of the data member. By setting the Name property, you can customize the name of the data member.
0
0
From : Practical Microsoft SOA
Members of a class that are not explicitly marked with the [DataMember] attribute are not automatically serialised, regardless of their accessibility level
0
0
No, No, Yes
OrderID will be zero if you try to load it from XML
https://stackoverflow.com/questions/1644004/how-do-i-add-an-xml-attribute-using-datacontract
1
0