Comparison of Data Types in common programming languages

Source: Internet
Author: User

 

 

Win32 types

CLR type

Char, int8, sbyte, char

System. sbyte

Short, short int, int16, short

System. int16

Int, long, long int, int32, long32, bool, int

System. int32

_ Int64, int64, Longlong

System. int64

Unsigned char, uint8, uchar, byte

System. byte

Unsigned short, uint16, ushort, word, Atom, wchar, _ wchar_t

System. uint16

Unsigned, unsigned int, uint32, ulong32, dword32, ulong, DWORD, uint

System. uint32

Unsigned _ int64, uint64, dwordlong, ulonglong

System. uint64

Float, float

System. Single

Double, Long Double, double

System. Double

The following table lists some value types supported by. NET Framework, briefly describes each type, and indicates the corresponding types in the Visual Basic, C #, and C ++ managed extensions. The table also contains items of the object and string classes. These items have corresponding keywords in many languages.

Category

Class Name

Description

Visual Basic Data Type

C # Data Type

C ++ managed Extended Data Type

JScript Data Type

Integer

Byte

An unsigned integer of 8 digits.

Byte

Byte

Char

Byte

 

Sbyte

An 8-bit signed integer.

Does not match Cls.

Sbyte

No built-in type.

Sbyte

Signed Char

Sbyte

 

Int16

A 16-bit signed integer.

Short

Short

Short

Short

 

Int32

A 32-bit signed integer.

Integer

Int

Int

-Or-

Long

Int

 

Int64

A 64-bit signed integer.

Long

Long

_ Int64

Long

Category

Class Name

Description

Visual Basic Data Type

C # Data Type

C ++ managed Extended Data Type

JScript Data Type

 

Uint16

A 16-bit unsigned integer.

Does not match Cls.

Uint16

No built-in type.

Ushort

Unsigned short

Uint16

 

Uint32

A 32-bit unsigned integer.

Does not match Cls.

Uint32

No built-in type.

Uint

Unsigned int

-Or-

Unsigned long

Uint32

 

Uint64

A 64-bit unsigned integer.

Does not match Cls.

Uint64

No built-in type.

Ulong

Unsigned _ int64

Uint64

Category

Class Name

Description

Visual Basic Data Type

C # Data Type

C ++ managed Extended Data Type

JScript Data Type

Floating Point

Single

Single precision (32-bit) floating point number.

Single

Float

Float

Float

 

Double

Double Precision (64-bit) floating point number.

Double

Double

Double

Double

Logic

Boolean

Boolean (true or false ).

Boolean

Bool

Bool

Bool

Others

Char

Unicode (16-bit) characters.

Char

Char

Wchar_t

Char

 

Decimal

96-digit decimal value.

Decimal

Decimal

Decimal

Decimal

 

Intptr

The size depends on the signed integer of the basic platform (32-bit platform and 64-bit platform.

Intptr

No built-in type.

Intptr

No built-in type.

Intptr

No built-in type.

Intptr

 

Uintptr

The size depends on the unsigned integer of the basic platform (32-bit platform and 64-bit platform ).

Does not match Cls.

Uintptr

No built-in type.

Uintptr

No built-in type.

Uintptr

No built-in type.

Uintptr

Class Object

Object

The root of the object hierarchy.

Object

Object

Object *

Object

 

String

A fixed-length string of Unicode characters.

String

String

String *

String

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.