Loading ...

Data types in C sharp | CodeAsp.Net

Data types in C sharp

 /5
0 (0votes)


In this blog I will tell how many Data types in C#. There are following Data types built into C#
and each one stores a different kind of data.


Note: whole number – its means it doesn’t have a decimal point.

 

Data TypeDescription    Bits
intint can store any whole Number from
-2,147,483,648 to 2,147,483,647
32 bits
stringString can hold text of any length 
boolbool is a Boolean value it’s either true
or false
8 bits
floatfloat can store any decimal numbers32 bits
bytebyte can store any whole numbers between 0 and 2558 bits
sbytesbyte can store any whole number from -127 to 1288 bits
shortshort can store any whole number from
-32,767 to 32,768
16 bits
ushortushort can store any whole number from
0 to 65,535
16 bits
uintuint can store any whole number from
0 to 4,294,967,295
32 bits
longlong can store any number between minus
and plus 9 billion billion
64 bits
ulongulong can store any number between 0 and 18 billion billion64 bits
doubledouble can store 15-16 significant digit64 bits
decimalDecimal can store 28-29 significant digit128 bits

Comments (no comments yet)

Top Posts