MtRock.cs Paradise 16

Qingshuan’s Programming Blog

Archive for February 1st, 2008

Microsoft Data Types

Posted by linuxprogram on February 1, 2008

Quoted from MSDN for Reference:

Class name

Description

Visual Basic data type

C# data type

C++ data type

JScript data type

Byte

An 8-bit unsigned integer.

Byte

byte

char

Byte

SByte

An 8-bit signed integer. Not CLS-compliant.

SByte

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

UInt16

A 16-bit unsigned integer. Not CLS-compliant.

UShort

ushort

unsigned short

UInt16

UInt32

A 32-bit unsigned integer. Not CLS-compliant.

UInteger

uint

unsigned int/ unsigned long

UInt32

UInt64

A 64-bit unsigned integer. Not CLS-compliant.

ULong

ulong

unsigned __int64

UInt64

Single

A single-precision (32-bit) floating-point number.

Single

float

float

float

Double

A double-precision (64-bit) floating-point number.

Double

double

double

double

Boolean

A Boolean value (true or false).

Boolean

bool

bool

bool

Char

A Unicode (16-bit) character.

Char

char

wchar_t

char

Decimal

A decimal (128-bit) value.

Decimal

decimal

Decimal

Decimal

IntPtr

A signed integer whose size depends on the underlying platform (a 32-bit value on a 32-bit platform and a 64-bit value on a 64-bit platform).

IntPtr

No built-in type.

IntPtr

No built-in type.

IntPtr

No built-in type.

IntPtr

UIntPtr

An unsigned integer whose size depends on the underlying platform (a 32- bit value on a 32-bit platform and a 64-bit value on a 64-bit platform).

Not CLS-compliant.

UIntPtr

No built-in type.

UIntPtr

No built-in type.

UIntPtr

No built-in type.

UIntPtr

Object

The root of the object hierarchy.

Object

object

Object*

Object

String

An immutable, fixed-length string of Unicode characters.

String

string

String*

String

Posted in C/C++/C# | Leave a Comment »