Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
CLS-compliant
Message
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Titre:
CLS-compliant
Divers
Thread ID:
01054054
Message ID:
01054054
Vues:
54
From the docs: "The UInt16 type is not CLS-compliant."

Do I want to stay CLS compliant? What if I don't comply?

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
Semper ubi sub ubi.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform