C#: Type System
- C# is a strongly-typed language.
- Every variable and constant has a type, as does every expression that evaluates to a value.
- Every method signature specifies a type for each input parameter and for the return value.
The Common Type System
It supports the principle of inheritance. Types can derive from other types, called base types. The derived type inherits (with some restrictions) the methods, properties, and other members of the base type.
Each type in the CTS is defined as either a value type or a reference type. This includes all custom types in the .NET class library and also your own user-defined types. Types that you define by using the struct keyword are value types; all the built-in numeric types are structs.
Semantic portal