Types and Base Types

In addition to declaring compatibility with multiple interfaces, a type can also specify at most one base type. A base type cannot be an interface, and, strictly speaking, the set of supported interfaces are not considered base types of the declaring type. Moreover, interfaces themselves have no base type. Rather, at most an interface has a set of supported interfaces just like those of a concrete type.

Non-interface types that do not specify a base type get System.Object as their base type. Base types sometimes trigger different runtime semantics from the CLR (e.g., reference vs. value type, marshal by reference, delegates). Base types can also be used to package common members into a single type that multiple types can ...

Get Essential .NET, Volume 1: The Common Language Runtime 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.