[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
EmitDefaultValue
is 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 6minOccurs
attribute is affected only by theIsRequired
setting, and 5 thenillable
attribute 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
We use cookies to improve the performance of the site. By staying on our site, you agree to the terms of use of cookies.