C# Data Types
- C# is a rich language that is why every variable has a data type in it.
- Data types assign the type of the value stored in a variable.
- There are several data types are present in C# which are used by the programmer at the time of creation of program.
In C# data types are categorized into three parts which are given below:
- Value Type
- Reference Type
- Pointer Type
- Value type data types are those data types which contains the actual data value.
- These data types are of fixed length and stored on the stack of memory.
- These data types are stored the copy of the value.
- They are derived from the System.ValueType Class.
We can further classify the Value Types into two parts :
User-Defined types are those value types which are defined by the users. There are two types of User-Defined types present in C# given below in the table:
Predefined Types are those value types which are already defined in C#.Following table contains all the Pre-Defined value data types of C#:
|bool||Boolean value||True or False||False|
|byte||8-bit unsigned integer||0 to 255||0|
|char||16-bit Unicode character||U +0000 to U +ffff||‘|