For binding classes with XML Schema complex types, the .NET Framework does not provide a direct programming language equivalent to the maxOccurs or minOccurs attribute.
When generating an XML Schema document from a set of classes in an assembly, Xsd.exe reverses the preceding conversions, producing a maxOccurs value of 1 from a single instance and a maxOccurs value of unbounded from an array.
None
0 Points
1 Post
Controlling maxOccurs property
Oct 10, 2016 12:47 PM|Aglo|LINK
Hi everyone
There is a webservce WCF. When i generate xsd for the WS, the maxOccurs property for the array element shows as unbounded
I need to set the property maxOccurs by specific value, what is the way to do this?
All-Star
17652 Points
3510 Posts
Re: Controlling maxOccurs property
Oct 11, 2016 03:05 AM|Chris Zhao|LINK
Hi Aglo,
For binding classes with XML Schema complex types, the .NET Framework does not provide a direct programming language equivalent to the maxOccurs or minOccurs attribute.
When generating an XML Schema document from a set of classes in an assembly, Xsd.exe reverses the preceding conversions, producing a maxOccurs value of 1 from a single instance and a maxOccurs value of unbounded from an array.
reference: https://msdn.microsoft.com/en-us/library/d3hx2s7e(v=vs.100).aspx
Best Regards,
Chris