Data Types in C Sharp



Following are the Datatypes in C Sharp



  • int- This is a 32 signed integer type data type. It range from -2,147,483,648 to 2,147,483,647 and it's default value is 0.

  • float- This is 32-bit single-precision floating point data type . It ranges from -3.4 x 1038 to + 3.4 x 1038 and it's default value is 0.0f.

  • string- This data type contains string of Unicode characters. It can range from any number of alphabet.

  • long-This is 64-bit signed integer data type.It ranges from -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 and it's default value is 0L.

  • short. This is 16-bit signed integer data type. It ranges from -32,768 to 32,767 and default value is 0.

  • bool-This is boolean value data type . It represents only two values True or False. Default value is False.

  • byte-This is 8-bit unsigned integer data type.It ranges from 0 to 255 and default value is 0.

  • char-This is 16-bit Unicode character data type. It ranges from U +0000 to U +ffff and default value is '0'.

  • decimal-This is 128-bit precise decimal values with 28-29 significant digits data type. It ranges from (-7.9 x 1028 to 7.9 x 1028) / 100 to 28 and  default value is 0.0.

  • double-This is 64-bit double-precision floating point data type. It's default value is 0.0D and  it ranges from (+/-)5.0 x 10-324 to (+/-)1.7 x 10308  .

  • sbyte-This is 8-bit signed integer data type. It ranges from -128 to 127 and default value is 0.

  • short-This is 16-bit signed integer data type. It ranges from -32,768 to 32,767 and 0 is it;s default value.

  • uint- This is 32-bit unsigned integer data type. It's range is 0 to 4,294,967,295 and having 0 default value.

  • ulong-This is 64-bit unsigned integer data type. It ranges from 0 to 18,446,744,073,709,551,615. and 0 is default value

  • ushort- This is  16 bit signed integer data type. Its range is 0 to 65,535. and default value is 0.

Data Types in C Sharp Data Types in C Sharp Reviewed by vishal on July 28, 2017 Rating: 5

No comments