2016-10-28 34 views
0

我的元素:爲什麼xdx.exe爲xs:nonNegativeInteger生成字符串屬性?

<xs:element name="achats" type="xs:nonNegativeInteger" minOccurs="0"/> 

產生於:

[System.Xml.Serialization.XmlElementAttribute(DataType="nonNegativeInteger")] 
public string achats 
{ 
    ... 
} 

爲什麼不是作爲一個小數,而不是字符串產生這個屬性? 在這個文檔它應該是System.Decimal https://msdn.microsoft.com/fr-fr/library/aa719879(v=vs.71).aspx

XSD由其他公司發送,所以我不能真正修改它。我覺得我不使用正確XSD.EXE,但我不知道如何...

在此先感謝

回答

相關問題