developerasun / myCodeBox-web

Open source code box for web developers.
Apache License 2.0
5 stars 0 forks source link

Data type : int vs uint #189

Open developerasun opened 2 years ago

developerasun commented 2 years ago

research : comparision between int and uint

read this

The primitive data types prefixed with "u" are unsigned versions with the same bit sizes. Effectively, this means they cannot store negative numbers, but on the other hand they can store positive numbers twice as large as their signed counterparts. The signed counterparts do not have "u" prefixed.

Type Min Max CLS-compliant
int -2,147,483,648 2,147,483,647 Yes
uint 0 4,294,967,295 No
long –9,223,372,036,854,775,808 9,223,372,036,854,775,807 Yes
ulong 0 18,446,744,073,709,551,615 No

reference

https://stackoverflow.com/questions/3724242/what-is-the-difference-between-int-and-uint-long-and-ulong

developerasun commented 2 years ago

in codes,

uint