C# has a unified type system. This unified type system is called Common Type System (CTS).
A unified type system implies that all types, including primitives such as integers, are subclasses of the System.Object class. For example, every type inherits a ToString() method. For performance reasons, primitive types (and value types in general) are internally allocated on the stack.
Categories of Data Types
CTS separates datatypes into two categories:
Value Type
Reference Type
While value types are those in which the value itself is stored by allocating memory on the stack, reference types are those in which only the address to the location where the value is present, is stored. Value types include integers (short, long), floating-point numbers (float, double), decimal (a base 10 number used for financial calculations), structures, enumerators, booleans and characters while reference types include objects, strings, classes, interfaces and delegates.
Answered by
Sharad Singh
, an ibibo Master,
at
8:18 PM on May 30, 2008