[Programming] Managed Extensions for C++ Development Scenarios


Starting with Visual C++ .NET, the standard C++ language has been extended to provide support for managed programming. Managed Extensions for C++ comprise of a set of keywords and attributes.
For each file using Managed Extensions, include the following code at the beginning of the file:

#using
using namespace System; // Only include to access the .NET Framework classes
In addition, you must use the /clr (common language runtime compilation) compiler option when compiling the application.

When using the .NET Framework, code that targets the common language runtime is known as managed code, while code that does not target the common language runtime is known as unmanaged code. Managed Extensions for C++ allows you to mix unmanaged and managed code within the same application. New applications written with Managed Extensions can take advantage of unmanaged code features and new managed code features. Existing components can easily be wrapped as .NET Framework components using Managed Extensions, preserving investment in existing code while integrating with the .NET Framework.
Managed Extensions is the best choice for the following development scenarios:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vcmex/html/vcconFeaturesOfManagedExtensionsForC.asp

Advertisements