C# Data Types
A data type specifies the type of data that a variable can store such as integer, floating, character etc.
There are 3 types of data types in C# language.
Value Data Type
The value data types are integer-based and floating-point based. C# language supports both signed and unsigned literals.
There are 2 types of value data type in C# language.
1) Predefined Data Types - such as Integer, Boolean, Float, etc.
2) User defined Data Types - such as Structure, Enumerations, etc.
The memory size of data types may change according to 32 or 64 bit operating system.
Let's see the value data types. It size is given according to 32 bit OS.
Reference Data Type
The reference data types do not contain the actual data stored in a variable, but they contain a reference to the variables.
If the data is changed by one of the variables, the other variable automatically reflects this change in value.
There are 2 types of reference data type in C# language.
1) Predefined Types - such as Objects, String.
2) User defined Types - such as Classes, Interface.
Pointer Data Type
The pointer in C# language is a variable, it is also known as locator or indicator that points to an address of a value.
Symbols used in pointer
Declaring a pointer
The pointer in C# language can be declared using * (asterisk symbol).
Next TopicC# Operators