views:

59

answers:

1

How can I tell to the XmlSerializer to serialize a string property that is empty?

        [XmlElement("description")]
        public string Description
        {
            get;
            set;
        }
+1  A: 

i did not try it, but "IsNullable" of XmlElementAttribute maybe helps with strings

Andreas Niedermair
I tired but it does not working
Cornel
just to be sure: you've set IsNullable to false?
Andreas Niedermair