[ACCEPTED]-Why is using [DataMember(EmitDefaultValue = false)] not recommended?-datamember
The reason is at the bottom of the article 13 that you link to. The short version is:
When 12 the
EmitDefaultValueis set to false, it is represented 11 in the schema as an annotation specific 10 to Windows Communication Foundation (WCF). There 9 is no interoperable way to represent this 8 information. In particular, the "default" attribute 7 in the schema is not used for this purpose, the 6
minOccursattribute is affected only by the
IsRequiredsetting, and 5 the
nillableattribute is affected only by the type 4 of the data member.
The actual default value 3 to use is not present in the schema. It 2 is up to the receiving endpoint to appropriately 1 interpret a missing element.
More Related questions