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

  • SEARCH
  • Home
  • 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 1038313
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T14:57:35+00:00 2026-05-16T14:57:35+00:00

A UInteger data type holds any value between 0 and 4,294,967,295 (ref. MSDN ).

  • 0

A UInteger data type holds any value between 0 and 4,294,967,295 (ref. MSDN).

If I try this code in VB.NET, I get a compiler error:

Dim Test As UInteger = &HFFFFFFFF

Error: “Constant expression not representable in type ‘UInteger’.

Why I can’t set 0xFFFFFFFF (4,294,967,295) to a UInteger if this type can hold this value?

  • 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-16T14:57:36+00:00Added an answer on May 16, 2026 at 2:57 pm

    I believe it’s because the literal &HFFFFFFFF is interpreted by the VB.NET compiler as an Integer, and that value for an Integer is a negative number (-1), which obviously can’t be cast to a UInteger.

    This issue is easily fixed by writing &HFFFFFFFFUI, appending the UI suffix to treat the literal as a UInteger.

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

Sidebar

Related Questions

I have a Dictionary with key of type UInteger and the value is List(Of
I'm using a library call, setInstance(ByVal instance As UInteger) , in my VB.NET code.
Although there are already a few resources online that address this rough topic, I
So I know there is this question addressing the need for getting the bytes
I have the current code: Public Declare Function FindWindow Lib user32.dll Alias FindWindowA (ByVal
I have this SQL Query which should find the rank of a certain cook.
How do I further reduce a SearchQuerySet based on a common M2M attribute such
I have a simple VB.NET form that acts as an interface to a control
Today I had a problem converting a Long (Int64) to an Integer (Int32). The
I am new to vb.net (framework 4) and visual studio is giving me warnings

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.