English 中文(简体)
视力: 演播室制作密码,处理与愤怒有关的xsd问题
原标题:Visual Studio: generating code upon xsd problems with integers

谁能告诉我,为什么在Sting油田将Xsd的 in化元素转化成?

<xs:element name="OwnerID" type="xs:integer"/>

页: 1

[System.Xml.Serialization.XmlElementAttribute(DataType = "integer")]
public string OwnerID
{
    get
    {
        return this.ownerIDField;
    }
    set
    {
        this.ownerIDField = value;
    }
}

我的第一项假设是,所有领域都是由真实数据类型所描述的,不是正确的——日期被解释为日期,毛毯是毛毯,什么是 in的错误?

提前感谢!

最佳回答

你们需要这样的东西:

<xs:element name="OwnerID" >
    <xs:simpleType>
        <xs:restriction base="xs:int" />
    </xs:simpleType>
</xs:element>
问题回答

q33G的答复是正确的,但我要补充的是,你原先的SD要素是正确的。

<xs:element name="OwnerID" type="xs:integer"/>

转成体是因为每个网站W3C Numeric DataTypes,xs:interger代表任何惯用价值。 由于该数字不仅限于32个或64个轨道编号,C#没有能够处理无约束的分类账的数字数据类型,因此,激光测验器正在选择一种扼杀类型,因为它是唯一能够安全处理这一数值的类型。





相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

NSArray s, Primitive types and Boxing Oh My!

I m pretty new to the Objective-C world and I have a long history with .net/C# so naturally I m inclined to use my C# wits. Now here s the question: I feel really inclined to create some type of ...

C# Marshal / Pinvoke CBitmap?

I cannot figure out how to marshal a C++ CBitmap to a C# Bitmap or Image class. My import looks like this: [DllImport(@"test.dll", CharSet = CharSet.Unicode)] public static extern IntPtr ...

How to Use Ghostscript DLL to convert PDF to PDF/A

How to user GhostScript DLL to convert PDF to PDF/A. I know I kind of have to call the exported function of gsdll32.dll whose name is gsapi_init_with_args, but how do i pass the right arguments? BTW, ...

Linqy no matchy

Maybe it s something I m doing wrong. I m just learning Linq because I m bored. And so far so good. I made a little program and it basically just outputs all matches (foreach) into a label control. ...

热门标签