George George

George George

  • NA
  • 778
  • 0

deserialization issue

Jan 7 2009 5:44 AM

Hello everyone,

1.

Here is one of the field of my class. During deserialization, if the counter attribute is null, the deserialization could still be successful. Any ideas to make deserialization be smarter to treat counter as a non-null (must to have value) attribute?

2.

Any other ways to make deserialization be even smarter to treat counter as an integer other than string? (i.e. if in the XML file, counter attribute is assigned to non-numeric value, deserialization will fail.)


[Code]
        [XmlAttribute("counter")]
        public string counter;
[/Code]

thanks in advance,
George