Difference between revisions of "Template:.NET Data Types"
esse quam videri
(until we get proper reference support, this will have to do) |
|||
Line 8: | Line 8: | ||
| char ||2 || Char ||Unicode Characters ascii unicode and other | | char ||2 || Char ||Unicode Characters ascii unicode and other | ||
|- | |- | ||
− | | bool 1 ||Boolean || True of False | + | | bool || 1 ||Boolean || True of False<br/><small>(Note: C# boolean values do not equate to integer values, or True != (read as is not equal to) 1 and False != 0)</small> |
|- | |- | ||
− | |sbyte || 1 ||SByte ||Signed integers(-128 to 127) | + | |sbyte || 1 ||SByte || Signed integers(-128 to 127) |
|- | |- | ||
|short ||2 ||Int16 || Signed integers(-32,768 to 32,767) | |short ||2 ||Int16 || Signed integers(-32,768 to 32,767) | ||
Line 16: | Line 16: | ||
|ushort || 2 ||UInt16 || Unsigned integers(0 to 65,535) | |ushort || 2 ||UInt16 || Unsigned integers(0 to 65,535) | ||
|- | |- | ||
− | |int ||4 || Int32 ||Signed integers(-2,147,483,648 to 2,147,483,647) | + | |int ||4 || Int32 || Signed integers(-2,147,483,648 to 2,147,483,647) |
|- | |- | ||
− | |uint || 4 || UInt32 || Unsigned integers(0 to 4,294,967,295) | + | |uint || 4 || UInt32 || Unsigned integers(0 to 4,294,967,295) |
|- | |- | ||
|float || 4 ||Single || fixed-precision up to 7 digits. Floating point number ( 1.5 x 10-45 to 3.4 x 1038 ) | |float || 4 ||Single || fixed-precision up to 7 digits. Floating point number ( 1.5 x 10-45 to 3.4 x 1038 ) | ||
|- | |- | ||
− | |double || 8 ||Double || fixed-precision up to 16 digits. Floating point number ( 5.0 x 10-324 to 1.7 x 10308 ) | + | |double || 8 ||Double || fixed-precision up to 16 digits. Floating point number ( 5.0 x 10-324 to 1.7 x 10308 ) |
|- | |- | ||
− | |decimal || 12 || Decimal || fixed-precision up to 28 digits. Typically used for financial calculations. Required the suffix "m" or "M" | + | |decimal || 12 || Decimal || fixed-precision up to 28 digits. Typically used for financial calculations. Required the suffix "m" or "M" |
|- | |- | ||
− | |long || 8 || Int64 || Signed integer ( -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807) | + | |long || 8 || Int64 || Signed integer ( -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807) |
|- | |- | ||
− | |ulong || 8 || UInt64 | + | |ulong || 8 || UInt64 || Unsigned integer (0 to 18,446,744,073,709,551,615 ) |
|} | |} |
Latest revision as of 22:08, 24 September 2008
Variable Types
Type | Size in Bytes | .Net Type | Description |
---|---|---|---|
byte | 1 | Byte | Unsigned (0-255) |
char | 2 | Char | Unicode Characters ascii unicode and other |
bool | 1 | Boolean | True of False (Note: C# boolean values do not equate to integer values, or True != (read as is not equal to) 1 and False != 0) |
sbyte | 1 | SByte | Signed integers(-128 to 127) |
short | 2 | Int16 | Signed integers(-32,768 to 32,767) |
ushort | 2 | UInt16 | Unsigned integers(0 to 65,535) |
int | 4 | Int32 | Signed integers(-2,147,483,648 to 2,147,483,647) |
uint | 4 | UInt32 | Unsigned integers(0 to 4,294,967,295) |
float | 4 | Single | fixed-precision up to 7 digits. Floating point number ( 1.5 x 10-45 to 3.4 x 1038 ) |
double | 8 | Double | fixed-precision up to 16 digits. Floating point number ( 5.0 x 10-324 to 1.7 x 10308 ) |
decimal | 12 | Decimal | fixed-precision up to 28 digits. Typically used for financial calculations. Required the suffix "m" or "M" |
long | 8 | Int64 | Signed integer ( -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807) |
ulong | 8 | UInt64 | Unsigned integer (0 to 18,446,744,073,709,551,615 ) |