C#代码(为xsd模式中带小数和int的choice元素生成)不';不包含枚举

C#代码(为xsd模式中带小数和int的choice元素生成)不';不包含枚举,c#,xsd,C#,Xsd,当我为这个xsd模式生成代码时: ... <xs:choice minOccurs="0" maxOccurs="1"> <xs:element name="IntProperty1" type="xs:int" default="0"/> <xs:element name="IntProperty2" type="xs:int" default="0"/> </xs:choice> ... 及 我是通过检查Item1的类型(是int

当我为这个xsd模式生成代码时:

...
<xs:choice minOccurs="0" maxOccurs="1">
   <xs:element name="IntProperty1" type="xs:int" default="0"/>
   <xs:element name="IntProperty2" type="xs:int" default="0"/>
</xs:choice>
...


我是通过检查Item1的类型(是int,是double)来完成的。它很好用

...
<xs:choice minOccurs="0" maxOccurs="1">
   <xs:element name="IntProperty" type="xs:int" default="0"/>
   <xs:element name="DoubleProperty" type="xs:double" default="0"/>
</xs:choice>
...
Item1 is double 
Item1 is int