Data Types Compared in Various Languages

This topic lists the data types for Visual Basic, C++, C#, and F#.

Table of Data Types

Content and size

Visual Basic

C++

C#

F#

Unknown data

Not applicable

VARIANT

Derive types, then link to Derived Types node

Discriminated Unions

Decimal

Decimal (.NET Framework structure)

DECIMAL

decimal

decimal

Date

Date (.NET Framework structure)

DATE

DateTime

DateTime

SBCS character

(1 byte)

Not applicable

signed char

__int8

Not applicable

sbyte

Unicode character (2 bytes)

Char (.NET Framework structure)

wchar_t

char

char

Unicode character sequence

String (.NET Framework class)

wchar_t*

string

string

Boolean (platform dependent)

Boolean (.NET Framework structure)

VARIANT_BOOL

bool

bool

1 byte

SByte Data Type (Visual Basic) (.NET Framework structure)

signed char

sbyte

sbyte

2 bytes

Short (.NET Framework structure)

signed short int

__int16

short

int16

4 bytes

Integer (.NET Framework structure)

long, (long int, signed long int)

int

int32

8 bytes

Long (.NET Framework structure)

__int64

long

int64

1 byte unsigned

Byte (.NET Framework structure)

BYTE

bool

byte

byte

2 bytes unsigned

UShort Data Type (Visual Basic) (.NET Framework structure)

unsigned short

ushort

uint16

4 bytes unsigned

UInteger Data Type (.NET Framework structure)

unsigned int and unsigned long

uint

uint

8 bytes unsigned

ULong Data Type (Visual Basic) (.NET Framework structure)

unsigned __int64

ulong

uint64

4 bytes floating point

Single (.NET Framework structure)

float

float

float32

-or-

single

8 bytes floating point

Double (.NET Framework structure)

double

double

float

-or-

double

See Also

Reference

Programming Concepts Compared in Various Languages, with Code Examples

Operators Compared in Various Languages

Controls and Programmable Objects Compared in Various Languages and Libraries

Other Resources

Language Equivalents