XSD.exe doesn't enforce minOccurs

Posted by G33kKahuna on Stack Overflow See other posts from Stack Overflow or by G33kKahuna
Published on 2010-05-03T14:00:53Z Indexed on 2010/05/03 14:08 UTC
Read the original article Hit count: 286

Filed under:
|
|

I have a simple schema where I'm declaring both minOccurs and maxOccurs to 1. When I run the XSD.exe to generate a C# class and consume the class in code; the field is not enforced as mandatory. Is there some additional step missing? or does the classes generated using XSD.exe don't mandatory fields?

any suggestions or insight will be helpful.

© Stack Overflow or respective owner

Related posts about xsd.exe

Related posts about xml-serialization