Simple data type table

Source: Internet
Author: User

C # simple data types

Description

Byte An unsigned 8-digit integer with a value of 0 ~ 255
Sbyte An 8-digit integer with a value of-127 ~ 127
Short A signed 16-digit integer in the range of-32768 ~ 32767
Ushort Unsigned 16-digit integer in the range of 0 ~ 65535
Int A 32-bit integer in the range of-2147483648 ~ 2147483647
Uint The unsigned 32 is an integer in the range of 0 ~ 4294967295
Long The signed 64 is an integer in the range of-9223372036854775808 ~ -9223372036854775807
Ulong Unsigned 64 is an integer in the range of 18446744073709511615
Bool True or false in logic)
Char 16 is a Unicode Character
Decimal Signed 128-bit data with 28 to 29 valid digits
Double 64 is a floating point with 15 to 16 decimal places
Float 32-bit floating point with 7 decimal places

Type conversion

Convert using the convert class

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.