Delen via


Data Types Compared in Different Languages

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

Table of Data Types

Content and size

Visual Basic

C++

C#

JScript

Visual FoxPro

Unknown data

n/a

VARIANT

Derive types, then link to Derived Types node.

Object

Variant

Decimal

Decimal (.NET Framework structure)

DECIMAL

decimal

decimal

n/a

Date

Date (.NET Framework structure)

DATE

DateTime

DateTime

Date object

Date

DateTime

SBCS character

(1 byte)

n/a

signed char

__int8

n/a

sbyte

Character

Unicode character (2 bytes)

Char (.NET Framework structure)

wchar_t

char

char

n/a

Unicode character sequence

String (.NET Framework class)

wchar_t*

string

String

VarChar

Boolean (platform dependent)

Boolean (.NET Framework structure)

VARIANT_BOOL

bool

boolean

Logical

1 byte

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

signed char

sbyte

n/a

n/a

2 bytes

Short (.NET Framework structure)

signed short int

__int16

short

short

n/a

4 bytes

Integer (.NET Framework structure)

long, (long int, signed long int)

int

int

Integer

8 bytes

Long (.NET Framework structure)

__int64

long

long

Float

1 byte unsigned

Byte (.NET Framework structure)

BYTE

bool

byte

byte

Integer

2 bytes unsigned

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

unsigned short

ushort

n/a

n/a

4 bytes unsigned

UInteger Data Type (.NET Framework structure)

unsigned int and unsigned long

uint

n/a

n/a

8 bytes unsigned

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

unsigned __int64

ulong

n/a

n/a

4 bytes floating point

Single (.NET Framework structure)

float

float

float

Float

8 bytes floating point

Double (.NET Framework structure)

double

double

Double

Double

See Also

Reference

Programming Concepts Compared in Different Languages with Code Examples

Operators Compared in Different Languages

Controls and Programmable Objects Compared in Different Languages and Libraries

Other Resources

Language Equivalents