bool
is one of the simplest data types. It accepts only 2 values – true or false.int
is short for integer and accepts only numbers. When working with numbers, int is the most commonly used data type. Integers have several data types within C#, depending on the size of the number.string
is used for storing text(charecters). In C#, strings are immutable, which means that strings are never changed after they have been created. When using methods which changes a string, the actual string is not changed - a new string is returned instead.char
is used for storing a single character.float
is one of the data types used to store numbers and decimals. DataTypes | Size | Values |
---|---|---|
String | Variable Length | 0-2 billion characters |
Object | - | - |
Dynamic = value;
For example, dynamic d=20; //Assingnement of value to dynamic variable
Type * identifier
For example,
Char * c; int* ptr;