2 ms·
C++/CLI really just exists for creating .NET bindings to C++ libraries, right? If you've got a C interface, LibraryImport in C# is sophisticated enough to get
by TillE 3y ago
C++/CLI really just exists for creating .NET bindings to C++ libraries, right?
If you've got a C interface, LibraryImport in C# is sophisticated enough to get the job done on its own.
- pjmlp 3y agoKind of, originally the plan was to have .NET everywhere. .NET 1.x brought Managed C++, which was replaced by C++/CLI in .NET 2.0. However Office and WinDev were never big fans of it, so its main purpose has been as easier interop for C++ libraries indeed. Also COM and C, as for anyone that is comfortable in C++, is is easier than getting all marshaling annotations correct. However it isn't an option for code that has to be portable, as it relies on Visual C++ toolchain.