Type System Unification

Type system unification is a concept where all types in C# are considered to be objects. The primitive types are value types, which are structs. Both classes and structs implicitly inherit from object. This leads to the conclusion that all types in C# are objects, which is type system unification. Value semantics enhances a program's ability to take advantage of efficiencies discussed earlier in this chapter. At the same time, all types have the inherent ability to support reference semantics in a clear and direct manner.

The Pre-Defined Types as structs

To further the concept of type system unification, C# pre-defined types are really struct typesAnd structs implicitly inherit from type object. The pre-defined types have ...

Get C# Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.