C# is said to be a strongly typed programming language in that when a variable is declared, its type must also be declared. Among other things, declaring a variable's type tells the compiler how much memory to allocate for the variable.
The C# language and .NET Framework make use of the Common Type System (CTS), a specification that defines a set of types as well as the behavior of those types. The CTS defines a wide variety of types in two main families—value types and reference types. In this chapter, we'll focus on C#'s predefined value types, also known as simple types, along with the string type, which happens to be a reference type; we'll defer a discussion of reference types in general until Chapter 3.
The C# language supports a variety of simple types. The most commonly used types are as follows (all of these are C# keywords):
bool: Boolean true or false value
char: 16-bit Unicode character
byte: 8-bit unsigned integer
short: 16-bit signed integer
int: 32-bit signed integer
long: 64-bit signed integer
float: 32-bit single-precision floating point
double: 64-bit double-precision floating point
Each variable declared to be of a simple type represents a single integer, floating point, Boolean, byte, or character value.