Is there a way to get the ShouldSerialize* pattern working with DataContractSerializer?
ShouldSerialize*
DataContractSerializer
Here is a small example:
I have a simple cl
You should set the IsRequired attribute on the DataMember:
[DataContract] public class Person { [DataMember(IsRequired = False, EmitDefaultValue = False)] public string FirstName { get; set; } ... }