Home > Getting Started > ASP.NET Base Types > Converting Types > Base Data Types Table
Getting Started ASP.NET Base Types
This document illustrates the relationship between the .NET Framework base data types and the primitive data types used by programming languages that target the common language runtime.
The System namespace is the root namespace for fundamental types in the .NET Framework. This namespace includes classes that represent the base types used by all applications.
Each of the .NET Framework base data types, also known as value types, correspond to the primitive data types used by the supported programming languages. When writing code using .NET Framework types, you can use the equivalent keyword of the language when a .NET Framework data type is expected.
The following table lists the value types the .NET Framework supplies, briefly describes each type, and indicates the corresponding type in Visual Basic, C#, the Managed Extensions for C++, and JScript.
Category |
Class Name |
Description |
Visual Basic |
C# |
C++ |
JScript |
Integer |
Byte |
An 8-bit unsigned integer. |
Byte |
byte |
char |
byte |
|
SByte |
An 8-bit signed integer.
Not CLS compliant. |
SByte |
sbyte |
signed char |
SByte |
|
Int16 |
A 16-bit signed integer. |
Short |
short |
short |
short |
|
Int32 |
A 32-bit signed integer. |
Integer |
int |
int or long |
int |
|
Int64 |
A 64-bit signed integer. |
Long |
long |
__int64 |
long |
|
UInt16 |
A 16-bit unsigned integer.
Not CLS compliant. |
UInt16 |
ushort |
unsigned short |
UInt16 |
|
UInt32 |
A 32-bit unsigned integer.
Not CLS compliant. |
UInt32 |
uint |
unsigned int or unsigned long |
UInt32 |
|
UInt64 |
A 64-bit unsigned integer.
Not CLS compliant. |
UInt64 |
ulong |
unsigned __int64 |
UInt64 |
Floating point |
Single |
A single-precision ( 32-bit ) floating-point number. |
Single |
float |
float |
float |
|
Double |
A double-precision ( 64-bit ) floating-point number. |
Double |
double |
double |
double |
Logical |
Boolean |
A Boolean value ( true or false ). |
Boolean |
bool |
bool |
bool |
Other |
Char |
A Unicode ( 16-bit ) character. |
Char |
char |
wchar_t |
char |
|
Decimal |
A 96-bit decimal value. |
Decimal |
decimal |
Decimal |
Decimal |
|
IntPtr |
A signed integer whose size depends on the underlying platform ( a 32-bit value on a 32-bit platform and a 64-bit value on a 64-bit platform ). |
IntPtr |
IntPtr |
IntPtr |
IntPtr |
|
UIntPtr |
An unsigned integer whose size depends on the underlying platform ( a 32- bit value on a 32-bit platform and a 64-bit value on a 64-bit platform ).
Not CLS compliant. |
UIntPtr |
UIntPtr |
UIntPtr |
UIntPtr |
Class objects |
Object |
The root of the object hierarchy. |
Object |
object |
Object* |
Object |
|
String |
An immutable, fixed-length string of Unicode characters. |
String |
string |
String* |
String |
Converting Types | Formatting Base Types | Parsing Strings | Type Conversion Tables