0

I have the following issue:

I have an integer property and would like it not to be written to XML during serialization if it is zero and only written if it has the value different from zero (one, two etc.) Is it possible to do somehow?

    [XmlAttribute]
    public int MyIntProperty;
Oleg Dudnyk
  • 1,009
  • 1
  • 10
  • 22
  • See the following: [previous question][1] [1]: http://stackoverflow.com/questions/5818513/xml-serialization-hide-null-values – Maess Nov 25 '13 at 15:28
  • @Maess click the "help" button next to "Add Comment" to see the proper format for an inline link – Tim S. Nov 25 '13 at 15:49

0 Answers0