Share via


Tipos de datos comparados en varios lenguajes

En este tema se enumeran los tipos de datos para Visual Basic, C++, C# y F#.

Tabla de tipos de datos

Contenido y tamaño

Visual Basic

C++

C#

F#

Decimal

Decimal (estructura de .NET Framework)

DECIMAL

decimal

decimal

Fecha

Date (estructura de .NET Framework)

DATE

DateTime

DateTime

Carácter SBCS

(1 byte)

No es aplicable

signed char

__int8

No es aplicable

sbyte

Carácter Unicode (2 bytes)

Char (estructura de .NET Framework)

wchar_t

char

char

Secuencia de caracteres Unicode

String (clase de .NET Framework)

wchar_t*

string

string

Booleano (depende de la plataforma)

Boolean (estructura de .NET Framework)

VARIANT_BOOL

bool

bool

1 byte

SByte (Tipo de datos, Visual Basic) (estructura de .NET Framework)

signed char

sbyte

sbyte

2 bytes

Short (estructura de .NET Framework)

signed short int

__int16

short

int16

4 bytes

Integer (estructura de .NET Framework)

long, (long int, signed long int)

Valor int.

int32

8 bytes

Long (estructura de .NET Framework)

__int64

long

int64

1 byte sin signo

Byte (estructura de .NET Framework)

BYTE

bool

byte

byte

2 bytes sin signo

UShort (Tipo de datos, Visual Basic) (estructura de .NET Framework)

unsigned short

ushort

uint16

4 bytes sin signo

UInteger (Tipo de datos) (estructura de .NET Framework)

unsigned int y unsigned long

uint

uint

8 bytes sin signo

ULong (Tipo de datos, Visual Basic) (estructura de .NET Framework)

unsigned __int64

ulong

uint64

Punto flotante de 4 bytes

Single (estructura de .NET Framework)

float

float

float32

O bien

single

Punto flotante de 8 bytes

Double (estructura de .NET Framework)

double

double

float

O bien

double

Vea también

Referencia

Conceptos de programación comparados en diferentes lenguajes y ejemplos de código

Operadores comparados en varios lenguajes

Comparación de los controles y objetos programables de distintos lenguajes y bibliotecas

Otros recursos

Equivalentes del lenguaje