I have a DataMember defined as -
[DataMember(EmitDefaultValue = false)]
public int OccurNbr { get; set; }
OccurNbr can be 0, which is a valid value. But if we specify EmitDefaultValue=false, then the element will not be displayed in the JSON/XML.
I do want to set a default value of OccurNbr, say -1 and will control the xml from displaying if the value is -1.
I am currently working on C#5, can you please let me know if we can change the default value of .Net type int and force EmitDefaultvalue to apply the control on the
new default value rather than on 0