Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3635826
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T00:57:12+00:00 2026-05-19T00:57:12+00:00

I inquired on VB.NET ‘s erratic behavior of treating all numerics as signed types

  • 0

I inquired on VB.NET‘s erratic behavior of treating all numerics as signed types back in Stack Overflow question Unsigned left shift in VB.NET?, and from the accepted answer there, was able to get by. Per that answer:

Visual Basic Literals

Also keep in mind you can add literals to your code in VB.NET and explicitly state constants as unsigned.

So I tried this:

Friend Const POW_1_32 As UInt32 = 4294967296UI

And VB.NET throws an Overflow error in the IDE. Pulling out the integer overflow checks doesn’t seem to help — this appears to be a flaw in the IDE itself.

This, however, doesn’t generate an error:

Friend Const POW_1_32 As UInt64 = 4294967296UL

So this suggests to me that the IDE isn’t properly parsing the code and understanding the difference between Int32 and UInt32. Any suggested workarounds and/or possible clues on when Microsoft will make unsigned data types intrinsic to the framework instead of the hacks they currently are?

EDIT: Ignore me. All the answers are correct, I’m having an idiot moment this late at night. The value is too large for the UInt32 data type. ::facepalm::

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T00:57:13+00:00Added an answer on May 19, 2026 at 12:57 am

    There’s no insidious bug or hack at play here. The number you are trying to assign to a UInt32 type is simply larger than its maximum allowed value. Why jump to the conclusion that Microsoft screwed up?

    The maximum value of the UInt32 type is 4,294,967,295. You’re trying to assign a value that is one greater than the max value (4,294,967,296). Thus, the compiler is correct in throwing an overflow error. This is the expected behavior.

    Everything works out fine when you try to assign the same number to a UInt64, because its maximum value is much larger at 18,446,744,073,709,551,615—the value 4,294,967,296 is well within its range.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

No related questions found

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.