8.2.1 Predefined types
C# provides a set of predefined types, most of which will be familiar to C
and C++ developers.
The predefined reference types are object and string. The type object is
the ultimate base type of all
other types. The type string is used to represent Unicode string values.
Values of type string are
immutable.
The predefined value types include signed and unsigned integral types,
floating-point types, and the types
bool, char, and decimal. The signed integral types are sbyte, short, int,
and long; the unsigned
integral types are byte, ushort, uint, and ulong; and the floating-point
types are float and double.
The bool type is used to represent boolean values: values that are either
true or false. The inclusion of bool
makes it easier to write self-documenting code, and also helps eliminate
the all-too-common C++ coding
error in which a developer mistakenly uses .=. when .==. should have been
used. In C#, the example
int i = .;
F(i);
if (i = 0) // Bug: the test should be (i == 0)
G();