La Escuela del Programador

 

Tipos de datos en .NET

En .NET, existen los siguientes tipos de variables (en la tabla se muestran también los alias de cada tipo de dato en C# y VB)

Tipo .NET Alias C# Alias VB ¿Con Signo? Bytes Rango
System.SByte sbyte SByte 1 -128 a 127
System.Int16 short Short 2 -32768 a 32767
System.Int32 int Integer 4 -2147483648 a 2147483647
System.Int64 long Long 8 -9223372036854775808 a 9223372036854775807
System.Byte byte Byte No 1 0 a 255
System.UInt16 ushort UShort No 2 0 a 65535
System.UInt32 uint UInteger No 4 0 a 4294967295
System.UInt64 ulong ULong No 8 0 a 18446744073709551615
System.Single float Single 4 Aprox. ±1.5 x 10-45 a ±3.4 x 1038 con 7 decimales
System.Double double Double 8 Aprox. ±5.0 x 10-324 a ±1.7 x 10308 con 15 o 16 decimales
System.Decimal decimal Decimal 12 Aprox. ±1.0 x 10-28 a ±7.9 x 1028 con 28 o 29 decimales
System.Char char Char N/A 2 Cualquier caracter Unicode
System.Boolean bool Boolean N/A Depende de la plataforma True o False
respag   
Panamá © 2012
http://respag.net/tipos-de-datos-en-net.aspx