Data types refer to an extensive system used for declaring variables or functions of different types. The type of a variable determines how much space it occupies in storage and how the bit pattern stored is interpreted.
VB.Net provides a wide range of data types. The following table shows all the data types available: Boolean,Byte,Char,Date,Decimal,Double,Integer,Long,Object,etc
The varibles in C#, are categorized into the following types:
Value types
Reference types
Pointer types
Value types :
Value type variables can be assigned a value directly. They are derived from the class System.ValueType.
The value types directly contain data. Some examples are int, char, and float, which stores numbers, alphabets, and floating point numbers, respectively. When you declare an int type, the system allocates memory to store the value.
Reference Type :
The reference types do not contain the actual data stored in a variable, but they contain a reference to the variables.
In other words, they refer to a memory location. Using multiple variables, the reference types can refer to a memory location. If the data in the memory location is changed by one of the variables, the other variable automatically reflects this change in value. Example of built-in reference types are: object, dynamic, and string.
Pointer Type :
Pointer type variables store the memory address of another type. Pointers in C# have the same capabilities as the pointers in C or C++.