Disparity between XML Schema types and .Net CLS types

Discussion in 'ASP .Net Web Services' started by MikeL, Feb 11, 2005.

  1. MikeL

    MikeL Guest

    Hello.

    The following link lists the mapping of XML Schema types to .Net Framework
    types:
    http://msdn.microsoft.com/library/d...cpguide/html/cpconXSDSchemaObjectModelSOM.asp

    I have a schema with an element of type "nonNegativeInteger". When I run
    XSD.exe over it and generate C# code, the element is typed in .Net as
    "string", and not "decimal" as the MSDN page indicates.

    Is the information on that page old or am I just missing something?

    Thanks in advance,

    Mike
    MikeL, Feb 11, 2005
    #1
    1. Advertising

  2. Something is amiss.
    Use a type of xs:decimal to map to System.Decimal.

    -D

    "MikeL" <> wrote in message
    news:ez%...
    > Hello.
    >
    > The following link lists the mapping of XML Schema types to .Net Framework
    > types:
    > http://msdn.microsoft.com/library/d...cpguide/html/cpconXSDSchemaObjectModelSOM.asp
    >
    > I have a schema with an element of type "nonNegativeInteger". When I run
    > XSD.exe over it and generate C# code, the element is typed in .Net as
    > "string", and not "decimal" as the MSDN page indicates.
    >
    > Is the information on that page old or am I just missing something?
    >
    > Thanks in advance,
    >
    > Mike
    >
    Dino Chiesa [Microsoft], Feb 14, 2005
    #2
    1. Advertising

  3. I confirmed this as a bug in the doc mentioned below.
    They're fixing it.
    Thanks for pointing it out.

    -Dino


    "Dino Chiesa [Microsoft]" <> wrote in message
    news:...
    > Something is amiss.
    > Use a type of xs:decimal to map to System.Decimal.
    >
    > -D
    >
    > "MikeL" <> wrote in message
    > news:ez%...
    >> Hello.
    >>
    >> The following link lists the mapping of XML Schema types to .Net
    >> Framework types:
    >> http://msdn.microsoft.com/library/d...cpguide/html/cpconXSDSchemaObjectModelSOM.asp
    >>
    >> I have a schema with an element of type "nonNegativeInteger". When I run
    >> XSD.exe over it and generate C# code, the element is typed in .Net as
    >> "string", and not "decimal" as the MSDN page indicates.
    >>
    >> Is the information on that page old or am I just missing something?
    >>
    >> Thanks in advance,
    >>
    >> Mike
    >>

    >
    >
    Dino Chiesa [Microsoft], Feb 22, 2005
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Markus
    Replies:
    1
    Views:
    1,518
    Markus
    Nov 23, 2005
  2. Stanimir Stamenkov
    Replies:
    3
    Views:
    1,244
    Stanimir Stamenkov
    Apr 25, 2005
  3. J Peyret
    Replies:
    10
    Views:
    433
    Steven D'Aprano
    Mar 19, 2011
  4. Kaldrenon
    Replies:
    5
    Views:
    120
    Michele Dondi
    Jun 16, 2007
  5. Kaldrenon
    Replies:
    4
    Views:
    111
    Michele Dondi
    Jun 16, 2007
Loading...

Share This Page