3.1.Variables and Types

Variables” are simply storage locations for data.

You can place data into them and retrieve their contents as part of a C# expression.

The C# simple types consist of the Boolean type and three numeric types

  • Integrals
  • Floating Point and Decimal
  • String.

The term “Integrals”, which is defined in the C# Programming Language Specification, refers to the classification of types that include sbyte, byte, short, ushort, int, uint, long, ulong, and char.

The term “Floating Point” refers to the float and double types.

The “string type” represents a string of characters

The “Boolean” types used for true or false values that must be assign the values when variable was declared.

Move back to C or C++ by using value 0 to check the false values and value 1 to check the true values that we use instead of Boolean type.

Yes No Suggest edit
Suggest Edit