
Explanation
DataContractSerializer DataContract DataMember
Target 1: [DataContract(NameSpace=http://contoso.com/2012/06)]
Target 2: [DataMember(Order=10)]
Target 3: [DataMember]
Target 1: The DataContractAttribute.Namespace Property gets or sets the namespace for the data contract for the type. Use this property to specify a particular namespace if your type must return data that complies with a specific data contract.
Target2, target3: We put Order=10 on FirstName to ensure that LastName is ordered first.
Note:
The basic rules for data ordering include:
* If a data contract type is a part of an inheritance hierarchy, data members of its base types are always first in the order.
* Next in order are the current type's data members that do not have the Order property of the DataMemberAttribute attribute set, in alphabetical order.
* Next are any data members that have the Order property of the DataMemberAttribute attribute set. These are ordered by the value of the Order property first and then alphabetically if there is more than one member of a certain Order value. Order values may be skipped.
Reference: Data Member Order
https://msdn.microsoft.com/en-us/library/ms729813(v=vs.110).aspx
Reference: DataContractAttribute.Namespace Property
https://msdn.microsoft.com/en-us/library/system.runtime.serialization.datacontractattribute.namespace(v=vs.110