I have a class with numerous Nullable
I had a similar problem with some code I was working on, and I decided just to use a string for the property I was serializing and deserializing. I ended up with something like this:
[XmlAttribute("Age")]
public string Age
{
get
{
if (this.age.HasValue)
return this.age.Value.ToString();
else
return null;
}
set
{
if (value != null)
this.age = int.Parse(value);
else
this.age = null;
}
}
[XmlIgnore]
public int? age;