C # drip-built-in Basic Types

Source: Internet
Author: User

The C # system namespace defines the basic types that can be used for local variables, member variables, parameters, and returned values. Corresponding keywords are matched in C.

Keywords

System Type

Range

Description

Bool

System. Boolean

True/false

Indicates logical truth or false

Sbyte

System. sbyte

-128 ~ 127

8-digit signed

Byte

System. byte

0 ~ 256

Unsigned 8-digit

Short

System. int16

-32768 ~ 32767

16-digit signed

Ushort

System. uint16

0 ~ 65535

Unsigned 16-digit

Int

System. int32

-2147483648 ~

2147483647

32-digit signed

Uint

System. uint32

0 ~ 4294967295

Unsigned 32-digit

Long

System. int64

-9223372036854775808 ~

9223372036854775807

Signed 64-digit

Ulong

System. uint64

0 ~ 18446744073709551615

Unsigned 64-digit

Char

System. Char

 

16-bit Unicode characters

Float

System. Single

 

32-Bit Single-precision floating point number

Double

System. Double

 

64-bit double-precision floating point number

Decimal

Decimal

 

128 characters

String

System. String

 

Indicates a combination of UNICODE character sets.

Object

System. Object

 

All types of base classes

 

In addition to string and object, the basic types are mostly struct, that is, the value type, and the memory is allocated to the stack.

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.