Common Language Runtime

by Administrator 18. May 2009 12:52

A language runtime allows an application to run on a target computer; it consists of
code that’s shared among all applications developed in a supported language. A
runtime contains the “guts” of language code, such as code that draws forms to the
screen, handles user input, and manages data. The runtime of .NET is called the
common language runtime.
Unlike runtimes for other languages, the common language runtime is designed as
a multilanguage runtime. For example, both C# and Visual Basic use the common
language runtime. In fact, currently more than 15 language compilers are being
developed to use the common language runtime.
Because all .NET languages share the common language runtime, they also share
the same Integrated Development Environment (IDE), forms engine, exception-
handling mechanism, garbage collector (discussed shortly), and much more. One
benefit of the multilanguage capability of the common language runtime is that
programmers can leverage their knowledge of a given .NET language.
For example, some developers on a team might be comfortable with Visual Basic,
whereas others are more comfortable with C#. Because both languages share the
same runtime, both can be integrated to deliver a single solution. In addition, a
common exception-handling mechanism is built into the common language run-
time so that exceptions can be thrown from code written in one .NET language and
caught in code written in another.
Code that runs within the common language runtime is called managed code
because the code and resources that it uses (variables, objects, and so on) are fully
managed by the common language runtime. Visual Basic is restricted to working
only in managed code, but some languages (such as C++) can drop to unmanaged
code—code that isn’t managed by the common language runtime.
Another advantage of the common language runtime is that all .NET tools share
the same debugging and code-profiling tools. In the past, Visual Basic was limited in
its debugging tools, whereas applications such as C++ had many third-party
debugging tools available. All languages now share the same tools. This means that
as advancements are made to the debugging tools of one product, they’re made to
tools of all products, because the tools are shared. This aspect goes beyond debug-
ging tools. Add-ins to the IDE such as code managers, for example, are just as readi-
ly available to Visual C# as they are to Visual Basic—or any other .NET language,
for that matter.

Tags:

Add comment

  Country flag

biuquote
  • Comment
  • Preview
Loading

About the author

Each morning when I open my eyes I say to myself: I, not events, have the power to make me happy or unhappy today. I can choose which it shall be. Yesterday is dead, tomorrow hasn’t arrived yet. I have just one day, today, and I’m going to be happy in it

Month List

Page List