.NET – Difference Between Int32 and UInt32

.netint32uint32

What is the difference between Int32 and UInt32?

If they are the same with capacity range capabilities, the question is for what reason UInt32 was created? When should I use UInt32 instead of Int32?

Best Answer

UInt32 does not allow for negative numbers. From MSDN:

The UInt32 value type represents unsigned integers with values ranging from 0 to 2 to the power of 32 or 2**32 (which equals to 4,294,967,295).