By simple data types, we mean data types that are not primarily used to hold other data, e.g. Objects, Structures, Arrays, that we will see later.
Most data types are identical across all .Net languages, which makes it easier to use assemblies written in different .Net languages within one application - one of the main benefits of the framework. The simple data types are divided in various categories, with some categories containing multiple types. The following table groups data types by category:
Type |
Category |
.Net Name |
Size in Bits |
---|---|---|---|
Unsigned Integer |
Byte |
8 |
|
Character |
Char |
16 |
|
Unsigned Integer |
UInt32 |
32 |
|
Numeric |
Decimal |
96 |
|
Multi purpose |
Dynamic |
Reference (32 or 64 bits) |
|
Signed Integer |
Int32 |
32 |
|
Signed Integer |
Int64 |
64 |
|
Logic |
Boolean |
8 |
|
Signed Integer |
Int32 |
32 |
|
Multi purpose |
Object |
Reference (32 or 64 bits) |
|
Multi purpose |
Intptr |
Reference (32 or 64 bits) |
|
Floating Point |
Single |
32 |
|
Floating Point |
Double |
64 |
|
Signed Integer |
SByte |
8 |
|
Signed Integer |
Int16 |
16 |
|
String |
String |
Reference (32 or 64 bits) |
|
Unsigned Integer |
Uint64 |
64 |
|
Not a type |
Void |
0 |
|
Unsigned Integer |
UInt16 |
16 |