Prevent <xsi:nil="true"> on Nullable Value Types when Serializing to XML.
- by Nat Ryall
I have added some nullable value types to my serializable class. I perform a serialization using XmlSerializer but when the value is set to null, I get an empty node with xsi:nil="true". This is the correct behaviour as I have found here: http://msdn.microsoft.com/en-us/library/ybce7f69%28VS.80%29.aspx
Is there a way to switch off this option so that nothing is output when the value type is null?