Sunteți pe pagina 1din 3

TIPOS DE DATOS

Nombre
Tipo Ancho Intervalo (bits)
corto
byte Entero sin signo 8 0 a 255
sbyte Entero con signo 8 -128 a 127
int Entero con signo 32 -2.147.483.648 a 2.147.483.647
uint Entero sin signo 32 0 a 4294967295
short Entero con signo 16 -32.768 a 32.767
ushort Entero sin signo 16 0 a 65535
long Entero con signo 64 -922337203685477508 a 922337203685477507
ulong Entero sin signo 64 0 a 18446744073709551615
Tipo de punto
float flotante de 32 -3,402823e38 a 3,402823e38
precisin simple
Tipo de punto
double flotante de 64 -1,79769313486232e308 a 1,79769313486232e308
precisin doble
Un carcter
char 16 Smbolos Unicode utilizados en el texto
Unicode
Tipo Boolean
bool 8 True o false
lgico
Tipo base de
object todos los otros
tipos

Una secuencia
string
de caracteres

Tipo preciso
fraccionario o
integral, que
puede
decimal representar 128 1.0 10e28 a 7.9 10e28
nmeros
decimales con
29 dgitos
significativos

SECUENCIAS DE ESCAPE

Secuencias de escape
Secuencia
Representa
de escape

\a Campana (alerta)

\b Retroceso
\f Avance de pgina
\n Nueva lnea
\r Retorno de carro
\t Tabulacin horizontal
\v Tabulacin vertical
\' Comilla simple
\" Comillas dobles
\\ Barra diagonal inversa
\? Signo de interrogacin literal
\ ooo Carcter ASCII en notacin octal
Carcter ASCII en notacin
\x hh
hexadecimal

Carcter Unicode en notacin


hexadecimal si esta secuencia de
\x hhhh escape se utiliza en una constante
de caracteres anchos o un literal de
cadena Unicode.

CASTING

1 ToBoolean
Converts a type to a Boolean value, where possible.
2 ToByte
Converts a type to a byte.
3 ToChar
Converts a type to a single Unicode character, where
possible.
4 ToDateTime
Converts a type (integer or string type) to date-time
structures.
5 ToDecimal
Converts a floating point or integer type to a decimal
type.
6 ToDouble
Converts a type to a double type.
7 ToInt16
Converts a type to a 16-bit integer.
8 ToInt32
Converts a type to a 32-bit integer.
9 ToInt64
Converts a type to a 64-bit integer.
10 ToSbyte
Converts a type to a signed byte type.
11 ToSingle
Converts a type to a small floating point number.
12 ToString
Converts a type to a string.
13 ToType
Converts a type to a specified type.
14 ToUInt16
Converts a type to an unsigned int type.
15 ToUInt32
Converts a type to an unsigned long type.
16 ToUInt64
Converts a type to an unsigned big integer.

17 String.Format("{0:0.00}", variable)

Firmas:
Alumno Representante

. .
Jos Arellano Katy Lpez

S-ar putea să vă placă și