C++ CLI Correct way to use #pragma managed / unmanaged
问题 I'm writing a C++ / CLI application, but I want most of the code in my C++ DLL to run natively (i.e. not managed). I have only got a single CLI class in the module, the other files are all native C++. So, what is the best way of ensuring that those native classes are run... Well, natively? Should I: A) Add #pragma unmanaged to the top of every native class B) Just add #pragma unmanaged before the includes in my single CLI class C) Something else? Thanks 回答1: You don't have to jump through