My class
public MyClass
{
[DataMemberAttribute(EmitDefaultValue = true)]
public decimal? a { get; set; }
[DataMemberAttribute(EmitDefaultValue = true)]
public DateTime? b { get; set; }
[DataMemberAttribute(EmitDefaultValue = true)]
public int? c { get; set; }
[DataMemberAttribute(EmitDefaultValue = true)]
public bool? d { get; set; }
}
Decimal, DateTime and int are nullable. So I have :
<MyClass ...>
<a>3</a>
<b i:nil="true"/>
<c i:nil="true"/>
<d i:nil="true"/>
</MyClass>
And when a, b, c will be null I want to get this :
<MyClass ...>
<a>3</a>
<b/>
<c/>
<d/>
</MyClass>