Is there any advantage to using C++/CLI over either standard C++ or C#?

.net, c#, c++, c++-cli, windows

Solution

If you're talking about why you would use C++/CLI over C#, I think the main reasons are that:

- it might be more natural for C++ developers (though I think this is probably not true)

- C++/CLI has very nice capabilities for bridging the native and managed environments (using the 'IJW' - It Just Works - technology)

I think that Herb Sutter probably gives the best overview:

A Design Rationale for C++/CLI

If you want to know why you might want to use native C++ over C#/.NET, this boils down to why you would want a managed environment (safety, easier development) over native code (absolute control, possibly speed advantages). There are arguments for each, and the answer really depends on what you want to develop and what your market might be.

Problem

I'm not seeing any real advantages, other than the fact that you have a C++ syntax, and with it, things like pointers and destructors.

Original source