Question: > 
> **Possible Duplicate:**   
> 
> [What is the difference between Managed C++ and C++/CLI?](https://stackoverflow.com/questions/2443811/what-is-the-difference-between-managed-c-and-c-cli)   
> 
> [What is CLI/C++ exactly? How does it differ to 'normal' c++?](https://stackoverflow.com/questions/6399493/what-is-cli-c-exactly-how-does-it-differ-to-normal-c)
> 
> 
> 

I am in doubt of distinguishing between C++ and C++.NET.

Is that right C++ is unmanaged code and C++.NET is managed code?

I need to program for a project in C++. For better building the GUI, I would prefer to use C++.NET.

I also have another plain C++ library (unmanaged C++ DLL file), will it be possible to use it as a normal DLL library in the C++.NET project?

Answer: 
Managed C++ is a now **deprecated** Microsoft set of deviations from C++, including grammatical and syntactic extensions, keywords and attributes, to bring the C++ syntax and language to the .NET Framework. These extensions allowed C++ code to be targeted to the Common Language Runtime (CLR) in the form of managed code as well as continue to interoperate with native code. Managed C++ was not a complete standalone, or full-fledged programming language.

Managed C++

```
#using <mscorlib.dll>
using namespace System;

int main()  {
  Console::WriteLine("Hello, world!");
  return 0;
}

```

Vanilla C++

```
#include <iostream>
using namespace std;

int main()
{
  cout << "Hello, world!";
 return 0;
}

```
* Yes, C++ is unmanaged code and C++/CLI is managed.
* Yes, you can use your unmanaged C++ DLL in your C++/CLI project. But you have to write a wrapper for that. That means you have to define the unmanaged methods you want to access in your C++/CLI project.

Example:

```
using System.Runtime.InteropServices;

[DllImport("YourDLLName")]
public static extern void UnmanagedMethodName(string parameter1);

```