About 19,500,000 results
Open links in new tab
  1. c# - What is the difference between “int” and “uint” / “long” and ...

    Sep 16, 2010 · I think it's also worth noting that specifically for int vs uint, the unsigned integer is not CLS-compliant, and it's recommended to use int as often as possible.

  2. Difference of using int and uint and when to use - Stack Overflow

    Nov 11, 2020 · What is the difference between using int and uint? All the examples I have seen so far are using int for integers. Any advantage of using uint? Thanks.

  3. c - Difference between uint and unsigned int? - Stack Overflow

    Apr 15, 2011 · Is there any difference between uint and unsigned int? I'm looking in this site, but all questions refer to C# or C++. I'd like an answer about the C language. If it is relevant, note …

  4. In Go, when should you use uint vs int? - Stack Overflow

    Jul 26, 2020 · Logic behind this is that when you convert an int type to a uint, the binary representation used for the int is kind of shoved into the uint type. In the end, everything is just …

  5. indexing - c++ uint , unsigned int , int - Stack Overflow

    1) uint = unsigned int, in fact uint is just a typedef for unsigned int (will be replaced by unsigned int on compile time). 2) If you want to add to your code some "security" go with uint, you'll avoid …

  6. What is the difference between an Uint32 and an unsigned int in …

    Feb 16, 2013 · uint32_t (or however pre-C++11 compilers call it) is guaranteed to be a 32-bit unsigned integer; unsigned int is whatever unsigned integer the compiler likes best to call …

  7. c# - using uint vs int - Stack Overflow

    Jun 23, 2010 · I prefer uint to int unless a negative number is actually in the range of acceptable values. In particular, accepting an int param but throwing an ArgumentException if the number …

  8. How do I convert uint to int in C#? - Stack Overflow

    Note that if the uint is greater than int.MaxValue you'll get a negative result if you use a cast, or an exception if you use Convert.ToInt32. Which makes Convert.ToInt32 the better choice imo. …

  9. c++ - What are "uint" variables? - Stack Overflow

    Apr 11, 2025 · uint is not a basic data type as mentioned in the standard. Sometimes, to make a variable to have constant size across platform [to enable portability], some typedef s are used.

  10. What happens when I assign a negative value to an unsigned int?

    The initializer converts this value from int to unsigned int. The rules for signed-to-unsigned conversion say that the value is reduced modulo UINT_MAX + 1, so -1 will convert to …