.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Declaring a UIn32 literal

4 REPLIES 4
Reply
Message 1 of 5
Anonymous
286 Views, 4 Replies

Declaring a UIn32 literal

can somebody tell me the correct syntax for declaring a hexadecimal literal
as a UInt32 in VB.NET? I have tried &H but the compiler always
wants to create a Long, not a UInt32. I have to declare a large constant
UInt32 array, so I'd rather not mess around with casting or parsing a
string. In C#, this seems to be quite trivial, but I can't figure it out in
VB.NET. Any suggestions?
4 REPLIES 4
Message 2 of 5
Anonymous
in reply to: Anonymous

I do not think that it is unique solutution:
[code]
Dim MyUint32 As UInt32 = Convert.ToUInt32(&H1234567)
[/code]
Message 3 of 5
Anonymous
in reply to: Anonymous

Note the ui suffix --

Dim x As UInt32 = &hFFFFFFFFui

"Jon Rizzo" wrote in message
news:5319075@discussion.autodesk.com...
can somebody tell me the correct syntax for declaring a hexadecimal literal
as a UInt32 in VB.NET? I have tried &H but the compiler always
wants to create a Long, not a UInt32. I have to declare a large constant
UInt32 array, so I'd rather not mess around with casting or parsing a
string. In C#, this seems to be quite trivial, but I can't figure it out in
VB.NET. Any suggestions?
Message 4 of 5
Anonymous
in reply to: Anonymous

VS 2002 not supported this syntax.
Message 5 of 5
Anonymous
in reply to: Anonymous

Oops, sorry, I'm just picking up 2005 and didn't realize this was a version
centric literal; bummer.

http://msdn2.microsoft.com/en-us/library/s9cz43ek.aspx

wrote in message news:5321904@discussion.autodesk.com...
VS 2002 not supported this syntax.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost