dont have access to .NET right now so I cant check..but in VB .NET can we use Unsigned integers?
ie
Dim a As UInt32
Dim b As UInt16
Printable View
dont have access to .NET right now so I cant check..but in VB .NET can we use Unsigned integers?
ie
Dim a As UInt32
Dim b As UInt16
You have UInt16 - 64 :)
yippee! :D
I don't get what's so great about that. Isn't it just a normal variable type?
I don't think those work in VB.NET only in C#.
You can correct me if I'm wrong.
I think it does work in vb.NET
Scott is right, VB doesn't support unsigned integers !
just thought i would come in here and mock you vb'ers..
no Unsigned inties for you
just for us the real coders, c#
oh ya, and i will confirm that unsigned ints are not in vb.net
It is possible to declare variables as uint16 (32, 64) in vb.net although msdn does say it is not CLS-complient.
So now I am confused. If I can declare them, and use them - are they supported or not?Quote:
Represents a 16-bit unsigned integer.
The UInt16 type is not CLS-compliant. The CLS-compliant alternative type is Int32. Int16 can be used when the original value is less than half of UInt16.MaxValue. For more information about CLS compliance, see What is the Common Language Specification.
Remarks
The UInt16 value type represents unsigned integers with values ranging from 0 to 65535.
Not CLS-complient means that it is not specified in the Language Specification. Which means that when I have a C# Library that exposes a member using an unsigned integer it's possible that other languages, like VB, can't interoperate with my code.
To insure you write CLS complient code take a look at the following attribute: [assembly:CLSCompliant(true)].