Appendix C. Introduction to .NET
.NET is based on a Common Language Runtime (CLR) environment that manages every runtime aspect of your code. All .NET components, regardless of the language in which they are developed, execute in the same runtime (hence the name). The CLR is like a warm blanket that surrounds your code, providing it with memory management, a secure environment to run in, object location transparency, concurrency management, and access to the underlying operating system services. Because the CLR manages these aspects of your object’s behavior, code that targets the CLR is called managed code. The CLR provides absolute language interoperability, allowing a high degree of component interoperability. COM, too, provides language independence, allowing binary components developed in two different languages (such as Visual Basic and C++) to call one another’s methods, but COM language interoperability is only at runtime. During development, .NET allows a component developed in one language to derive from a component developed in another language seamlessly. .NET is capable of this process because the CLR is based on a strict type system. To qualify as a .NET language, all constructs (such as class, struct, or primitive types) in every language must compile to CLR-compatible types. The language interoperability gain is at the expense of existing languages and compilers. Existing compilers produce CLR-ignorant code—code that does not comply with the CLR type system and ...
Get COM & .NET Component Services 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.