Constant expression not representable in type 'UInteger'
-
02-06-2021 - |
Question
If I run the following code in C# then it runs fine
UInt32 a
a = 0x9E3779B9
But when I run the same code in VB.Net then it gives me error "Constant expression not representable in type 'UInteger'"
Dim a As UInt32
a = &H9E3779B9
OTHER TIPS
I think you can solve you problem by viewing this link see the workarounds section in this link
Just add "UI" to the end of the literal:
Dim x as UInteger = &HF2894233UI
Otherwise &H returns a signed Integer
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow