Type Value
Type Value
System.Int32 (Integer/int)
System.UInt32 (UInteger/uint) System.Int64 (Integer/int)
4
4
-2147483648 to 2147483647
0 to 4294967295
10
Financial and scientific 792281625142643375935 calculations requiring 43950335 to great precision 792281625142643375935 43950335
BEST PRACTICES
El runtime optimizes the performance of 32-bits (int32, int16) for counters. For floating-point operations, Double is the most efficient type because those operations are optimized by hardware.
Using the alias is equivalent to using the full type name, so most programmers use the shorter aliases
2 4 Plataformdependent
System.DateTime (Date/date)
User-Typed types are also called structures or simply structs. As with other value type, instances of userDefined types are stored on the stack. Struct behave nearly identical to class. You define you own sttructures by using the struct keyWork
Struct
Casi todas las estructuras comparten la misma sintaxis que las clases, aunque estn ms limitadas que stas: Dentro de una declaracin de estructura, los campos no se pueden inicializar a menos que se declaren como constantes o estticos. Una estructura no puede declarar un constructor predeterminado (es decir, un constructor sin parmetros) ni un destructor.
Struct
Las estructuras tienen las propiedades siguientes: Las estructuras son tipos de valor, mientras que las clases son tipos de referencia. A diferencia de las clases, se pueden crear instancias de las estructuras sin utilizar un operador new. Las estructuras pueden declarar constructores, pero deben utilizar parmetros. Una estructura no puede heredar de otra estructura o clase, ni puede ser la base de una clase. Todas las estructuras heredan directamente de System.ValueType, que hereda de System.Object. Una estructura puede implementar interfaces.
Simplify coding and improve code readibility by enabling yo to use meaningful symbols.
Titles t = Titles.Dr Console.WriteLine({0}., t); //Display DR