Export (0) Print
Expand All

Managed Extensions for C++ Background

Visual Studio .NET 2003

The .NET Framework is a new computing platform that simplifies application development in highly distributed environments. The .NET Framework has two main components: the common language runtime and the .NET Framework class library. The common language runtime manages code at execution time, providing core services such as memory management, thread management, and remoting, while also enforcing strict type safety and other forms of code accuracy that ensure security and robustness. The class library is a comprehensive, object-oriented collection of reusable types that you can use to develop applications. For more information about the .NET Framework, see Overview of the .NET Framework.

Managed Extensions for C++ was created to extend the C++ language, allowing you to use the .NET Framework and target the common language runtime without having to learn a new programming language.

Note   It is not necessary to convert all your existing C++ code to use Managed Extensions syntax. You will need to use Managed Extensions syntax to expose C++ entities to other .NET applications, however. For example, if you want to port an existing C++ class library to .NET, you need to either modify existing classes to support Managed Extensions or create new classes that serve as interfaces to the existing classes.

Managed Extensions extends C++ in the following ways:

  • New project creation. Includes project templates that are set up with background code to help you start developing .NET applications quickly. For details, see Managed Extensions for C++ Projects.
  • Syntax. Includes new keywords, attributes, pragmas, preprocessor directives, compiler options, and linker options. For details, see Managed Extensions for C++ Reference.
  • Compilation. Includes the /clr compiler option to generate Microsoft Intermediate Language (MSIL) code. This code can then be executed by the common language runtime. If you work from the command line, specify the /clr compiler option. If you work in the integrated development environment, the /clr compiler option is used automatically when you create a Managed Extensions project.

In addition, you can modify your existing C++ projects to include support for .NET. For details, see Adding Support for Managed Extensions for C++ to an Existing Application.

See Also

Development Scenarios | Migrating Your Applications

Show:
© 2014 Microsoft