O'Reilly logo

VB.NET Language in a Nutshell, Second Edition by Steven Roman PhD, Paul Lomax, Ron Petrusha

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Common Language Runtime (CLR), Managed Code, and Managed Data

The Common Language Runtime (CLR) is an environment that manages code execution and provides application-development services. Compilers such as VB.NET expose the CLR’s functionality to enable developers to create applications. Code that is created under this environment is called managed code . Note that COM components are not managed code, although they (as well as other unmanaged code) can be used in applications that are built under the CLR.

The output of a compiler includes metadata, which is information that describes the objects that are part of an application, such as:

  • Data types and their dependencies

  • Objects and their members

  • References to required components

  • Information (including versioning information) about components and resources that were used to build the application

Metadata is used by the CLR to do such things as:

  • Manage memory allocations

  • Locate and load class instances

  • Manage object references and perform garbage collection

  • Resolve method invocations

  • Generate native code

  • Make sure that the application has the correct versions of necessary components and resources

  • Enforce security

The metadata in a compiled software component makes the component self- describing. This implies that components, even those written in another language, can interact with the given component directly.

Objects that are managed by the CLR are referred to as managed data. (It is also possible to use unmanaged data in applications.) ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required