Hi,
I'm using XmlSerializer to serialize a class which contains a String among
other things (ints, chars etc.. simple stuff). The string is returned from a
database and as such may be null.
Now the XmlSerializer will serialize the class as long as the String is not
null. I've tried applying the
[System::Xml::Se rialization::Xm lElementAttribu te(IsNullable = false)]
attribute to the data member but this has not changed the situation.
Has anyone else had this problem before? And know how to fix it or work
around it?
It must be possible to serialize null strings!
Cheers
John
I'm using XmlSerializer to serialize a class which contains a String among
other things (ints, chars etc.. simple stuff). The string is returned from a
database and as such may be null.
Now the XmlSerializer will serialize the class as long as the String is not
null. I've tried applying the
[System::Xml::Se rialization::Xm lElementAttribu te(IsNullable = false)]
attribute to the data member but this has not changed the situation.
Has anyone else had this problem before? And know how to fix it or work
around it?
It must be possible to serialize null strings!
Cheers
John