XSD tool appends “Specified” to certain properties/fields when generating C# code

*爱你&永不变心* 提交于 2019-11-29 09:34:16
Frank Hu

the bool attribute means the related attribute should be serialized.

e.g.

If the bool MinDuration_100msSpecified is set to false, and you set the MinDuration_100ms to be 300, when you use XmlSerializer to serialize the object, the MinDuration_100ms attribute won't be serialized.

This feature can save the serialized xml file to be minimal.

Set minOccurs="1" where element is nillable. For example:

<xs:element name="StageOnDemand" type="xs:boolean" nillable="true" minOccurs="1" />
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!