Data Types Compared in Different Languages
This topic lists the data types for Visual Basic, C++, C#, JScript, and Visual FoxPro.
Table of Data Types
Content and size |
Visual Basic |
C++ |
C# |
JScript |
Visual FoxPro |
---|---|---|---|---|---|
Unknown data |
n/a |
VARIANT |
Derive types, then link to Derived Types node. |
Object |
Variant |
Decimal |
Decimal (.NET Framework structure) |
DECIMAL |
decimal |
n/a |
|
Date |
Date (.NET Framework structure) |
DATE |
Date object |
Date DateTime |
|
SBCS character (1 byte) |
n/a |
n/a |
sbyte |
Character |
|
Unicode character (2 bytes) |
Char (.NET Framework structure) |
wchar_t |
char |
n/a |
|
Unicode character sequence |
String (.NET Framework class) |
wchar_t* |
String |
VarChar |
|
Boolean (platform dependent) |
Boolean (.NET Framework structure) |
VARIANT_BOOL |
boolean |
Logical |
|
1 byte |
SByte Data Type (Visual Basic) (.NET Framework structure) |
signed char |
n/a |
n/a |
|
2 bytes |
Short (.NET Framework structure) |
signed short int |
short |
n/a |
|
4 bytes |
Integer (.NET Framework structure) |
int |
Integer |
||
8 bytes |
Long (.NET Framework structure) |
long |
Float |
||
1 byte unsigned |
Byte (.NET Framework structure) |
BYTE |
byte |
Integer |
|
2 bytes unsigned |
UShort Data Type (Visual Basic) (.NET Framework structure) |
unsigned short |
n/a |
n/a |
|
4 bytes unsigned |
UInteger Data Type (.NET Framework structure) |
unsigned int and unsigned long |
n/a |
n/a |
|
8 bytes unsigned |
ULong Data Type (Visual Basic) (.NET Framework structure) |
unsigned __int64 |
n/a |
n/a |
|
4 bytes floating point |
Single (.NET Framework structure) |
float |
Float |
||
8 bytes floating point |
Double (.NET Framework structure) |
Double |
Double |
See Also
Reference
Programming Concepts Compared in Different Languages with Code Examples
Operators Compared in Different Languages
Controls and Programmable Objects Compared in Different Languages and Libraries