Type Fundamentals

Types are the building block of every CLR program. Once developers decide how to partition a project into one or more assemblies, most of their time is spent thinking about how their types will work and how their types will interrelate. Programming languages such as C# and VB.NET may have several constructs for expressing types (e.g., classes, structs, enums, etc.), but ultimately all of these constructs map down to a CLR type definition.

A CLR type is a named, reusable abstraction. The description of a CLR type resides in the metadata of a CLR module. That module will also contain any CIL or native code required to make the type work. CLR type names have three parts: an assembly name, an optional namespace prefix, and a local ...

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.