|
-
Mar 12th, 2002, 02:57 PM
#1
Unsigned Integers?
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
-
Mar 12th, 2002, 03:03 PM
#2
Frenzied Member
You have UInt16 - 64
-
Mar 12th, 2002, 03:04 PM
#3
yippee!
-
Mar 12th, 2002, 03:24 PM
#4
Frenzied Member
I don't get what's so great about that. Isn't it just a normal variable type?
-
Mar 13th, 2002, 10:50 AM
#5
Hyperactive Member
I don't think those work in VB.NET only in C#.
You can correct me if I'm wrong.
-scott
he he he
-
Mar 13th, 2002, 11:44 AM
#6
Hyperactive Member
I think it does work in vb.NET
-
Mar 13th, 2002, 12:32 PM
#7
Lively Member
Scott is right, VB doesn't support unsigned integers !
-
Mar 13th, 2002, 04:02 PM
#8
Frenzied Member
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
-
Mar 14th, 2002, 04:28 AM
#9
Hyperactive Member
It is possible to declare variables as uint16 (32, 64) in vb.net although msdn does say it is not CLS-complient.
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.
So now I am confused. If I can declare them, and use them - are they supported or not?
-
Mar 16th, 2002, 05:38 AM
#10
Lively Member
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)].
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|