Data Types Compared in Different Languages

This topic lists the data types for Visual Basic, Visual J#, Visual C++, Visual C#, JScript, and Visual FoxPro.

Storage size Visual Basic Visual J# Visual C++ C# NEW JScript Visual FoxPro
16 bytes n/a n/a VARIANT n/a Object Variant
Decimal Decimal NEW (.NET Framework class) n/a DECIMAL decimal decimalNEW n/a
Date Date NEW (.NET Framework class) java.util.Date or System.DateTime DATE DateTime NEW (.NET Framework class) System.DateTime. Also the JScript Dates Date object. Date; DateTime
(varies) String NEW (.NET Framework class) java.lang.String or System.String n/a string StringNEW n/a
1 byte Byte byte BYTE, bool byte byteNEW Logical
2 bytes Boolean boolean VARIANT_BOOL bool booleanNEW n/a
2 bytes Short, Char (Unicode character) short signed short int, __int16 short, char (Unicode character) shortNEW, charNEW n/a
1 byte n/a char signed char, __int8   SbyteNEW Character
4 bytes Integer int long, (long int, signed long int) int intNEW Integer
8 bytes Long NEW long __int64 long longNEW Float
4 bytes Single float float float floatNEW n/a
8 bytes Double double double double doubleNEW Double
4 bytes in table n/a n/a n/a n/a n/a General

See Also

Language Equivalents | Programming Concepts Compared in Different Languages with Code Examples | Operators Compared in Different Languages | Controls and Programmable Objects Compared in Different Languages and Libraries