I am wondering when I would use c++ in managed versus unmanaged mode?
Are there speed advantages with one mode over the other?
Is it easier to access 3rd party libraries in one mode over the other?
Are there any installation issues to worry about?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I find that managed mode (C++/CLI) is primarily useful as a gateway facility that allows you to leverage legacy libraries. In short, I used it when I have to program in .Net, but need access to a C++ code base.
On its own, there’s very little reason to choose C++/CLI over C#, which is cleaner, more modern, better-supported by the IDE and a gazillion tools (ReSharper, for instance), and can even do occasional low-level stuff via the unsafe keyword.
C++/CLI has been touted by its designers as the most powerful .Net language (largely because of the seamless legacy bridge and true RAII semantics for .Net objects), but it hasn’t gotten much traction in the .Net community.