What’s the range of each value data type in C#?

What’s the range of each value data type in C#

These are the basic data types in C# and their range:


KeywordClass Range
boolSystem.Booleantrue and false
byteSystem.Byte0 to 255
sbyteSystem.SByte-128 to 127
shortSystem.Int16-32768 to 32767
ushortSystem.Uint160 to 65535
intSystem.Int32-2,147,483,648 to 2,147,483,647
uintSystem.UInt320 to 4,294,967,295
longSystem.Int64-9,223,372,036,854,775,808 to 9,223,372,036,854,775,807
ulongSystem.UInt640 to 18,446,744,073,709,551,615
decimalSystem.Decimal-79,228,162,514,264,337,593,543,950,335 to 79,228,162,514,264,337,593,543,950,335
doubleSystem.Double-1.79769313486232e308 to 1.79769313486232e308
floatSystem.Single-3.402823e38 to 3.402823e38
charSystem.Char0 to 65535

Leave a Reply

Your email address will not be published. Required fields are marked *

Back To Top