XML Serialization Nullable Types

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
Im trying to serialize Nullable types and dont want to show the element if it is null. Meaning...
public float? MyFloat {get;set;}
If null, it should not be present.
Same as a DateTime...
public DateTime? MyDateTime {get;set;}
Anyone have some easy way to do this? Thanks in advance.

View the full article
 
Back
Top