Number Data Types
Integer
Keyword | System. | Suffix | VB.Net | Comments |
sbyte | System.SByte | (8 bits) -128 to 127 | ||
byte | System.Byte | Byte | (8 bits) Unsigned Integer 0 to 255 | |
short | System.Int16 | Short | (16 bits) -32,768 to 32,767 Integer in VBA | |
ushort | System.UInt16 | (16 bits) Unsigned Integer 0 to 65,535 | ||
int | System.Int32 | Integer | (32 bits) -2,147,483,648 to 2,147,483,647 | |
uint | System.UInt32 | u or U | (32 bits) Unsigned Integer 0 to 4,294,967,295 | |
long | System.Int64 | l or L | Long | (64 bits) -9.2 E 18 to 9.2 E 18 |
ulong | System.UInt64 | ul or UL | (64 bits) Unsigned Integer 0 to 1.84 E 19 |
Floating Point
Keyword | System. | Suffix | VB.Net | Comments |
float | System.Single | f or F | Single | (32 bits, 4 bytes) Single Precision Floating Point -3.402 E 38 to 3.4.02 E 38, precision ~6-9 digits |
double | System.Double | d or D (R in VB.Net) | Double | (64 bits, 8 bytes) Double Precision Floating Point -1.797 E 308 to 1.797 E 308, precision ~15-17 digits |
decimal | System.Decimal | m or M (D in VB.Net) | Decimal | (128 bits, 16 bytes) Precise Integer and Fractional type Can represent decimal numbers with 29 significant digits 1 E -28 to 7.9 E 28 Currency in VBA |
© 2023 Better Solutions Limited. All Rights Reserved. © 2023 Better Solutions Limited TopPrevNext