C++.net vs C#

Started by
4 comments, last by antareus 19 years, 6 months ago
C++.net has any advantages over C# excluding the option to mix unmanaged and managed code?
Advertisement
The advantage of using Managed C++ is that it is much easier to migrate old code into .NET. The disadvantage is that it sucks.
Quote:Original post by jperalta
The advantage of using Managed C++ is that it is much easier to migrate old code into .NET. The disadvantage is that it sucks.

[grin]
Managed C++ should only be used for wrapping old code. It is UGLY!! C# is the natural language for .NET.
The 2.0 Managed C++ is much more pleasant than the old managed C++, but the interop facilities are more efficient in either type of managed c++ than in C#. Other than that creating mixed mode assemblies is handly from time to time, but you alread knew about those.

Managed C++ is useful to know. At work I used it to bring unmanaged components into a managed environment with finer control than C#'s P/Invoke would allow me. (Specifically, I needed to unload the DLL after a certain amount of time to force it to clean up.)

P/Invoke's marshalling of a managed delegate into an unmanaged function pointer pretty much redefines sexy, however.
--God has paid us the intolerable compliment of loving us, in the deepest, most tragic, most inexorable sense.- C.S. Lewis

This topic is closed to new replies.

Advertisement