Professional Web Applications Themes

Disparity between XML Schema types and .Net CLS types - ASP.NET Web Services

Hello. The following link lists the mapping of XML Schema types to .Net Framework types: [url]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconXSDSchemaObjectModelSOM.asp[/url] 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...

  1. #1

    Default Disparity between XML Schema types and .Net CLS types

    Hello.

    The following link lists the mapping of XML Schema types to .Net Framework
    types:
    [url]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconXSDSchemaObjectModelSOM.asp[/url]

    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 Guest

  2. #2

    Default Re: Disparity between XML Schema types and .Net CLS types

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

    -D

    "MikeL" <MichaelLopezinds.com> wrote in message
    news:ez%23RxyHEFHA.3580TK2MSFTNGP10.phx.gbl...
    > Hello.
    >
    > The following link lists the mapping of XML Schema types to .Net Framework
    > types:
    > [url]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconXSDSchemaObjectModelSOM.asp[/url]
    >
    > 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] Guest

  3. #3

    Default Re: Disparity between XML Schema types and .Net CLS types

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

    -Dino


    "Dino Chiesa [Microsoft]" <dinochonline.microsoft.com> wrote in message
    news:uQfnd0uEFHA.3304tk2msftngp13.phx.gbl...
    > Something is amiss.
    > Use a type of xs:decimal to map to System.Decimal.
    >
    > -D
    >
    > "MikeL" <MichaelLopezinds.com> wrote in message
    > news:ez%23RxyHEFHA.3580TK2MSFTNGP10.phx.gbl...
    >> Hello.
    >>
    >> The following link lists the mapping of XML Schema types to .Net
    >> Framework types:
    >> [url]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconXSDSchemaObjectModelSOM.asp[/url]
    >>
    >> 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] Guest

Similar Threads

  1. schema data types
    By steeban in forum Macromedia Flash Data Integration
    Replies: 0
    Last Post: June 4th, 10:00 AM
  2. Replies: 2
    Last Post: December 23rd, 09:49 PM
  3. Enumerated Types
    By Joe in forum ASP.NET Web Services
    Replies: 3
    Last Post: November 12th, 02:57 PM
  4. Different connection types
    By Don Grover in forum ASP Database
    Replies: 3
    Last Post: November 3rd, 12:10 PM
  5. Column Types
    By Brad in forum Macromedia Dreamweaver
    Replies: 0
    Last Post: July 22nd, 04:16 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139