Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
CLS-compliant
Message
From
28/09/2005 14:32:17
Keith Payne
Technical Marketing Solutions
Florida, United States
 
General information
Forum:
ASP.NET
Category:
Other
Title:
Miscellaneous
Thread ID:
01054054
Message ID:
01054107
Views:
22
>From the docs: "The UInt16 type is not CLS-compliant."
>
>Do I want to stay CLS compliant? What if I don't comply?
>
Then the CLS police would come knocking!

Not CLS-compliant means that the type may not be available in other .NET languages. It would become a regular, signed Int16.

>I have a two byte number (0-65535) and UInt16 would work great to represent this number. I have in the past simply used Int32 and added my own error checking to make sure the number is in the range I want it to be. Should I stick with Int32 or should I go non-compliant and use UInt16? (the motivation for researching this is to potentially save 2 bytes of memory <s>)
>
>Thanks,
>Einar
Previous
Reply
Map
View

Click here to load this message in the networking platform