C# FAQ: Does CSharp replace Cplusplus

Microsoft .NET Framework, ASP.NET, Visual C# (CSharp, C Sharp, C-Sharp) Developer Training, Visual Studio


Jump to: navigation, search
CSharp-Online.NET:FAQs
edit

Does C# replace C++ ?

The C++ developer for the Windows platform has three options:

  • Use standard C++; and, avoid .NET completely.
  • Use the .NET version of C++ which produces Microsoft Intermediate Language (MIL) rather than machine language. A set of C++ extensions are implemented to allow full use of the .NET Platform, e.g. garbage collection. In .NET version 1, they are called "Managed Extensions for C++". In .NET version 2, they have been redesigned and renamed "C++/CLI".
  • Abandon C++ and use C#—the powerful .NET language most like C++.

Each option has advantages and disadvantages. Managed C++ is very handy for writing interop between .NET code and legacy C++ code. (From C#, call a managed wrapper class written in C++.) However, in the long run, C# is probably the best option.


Personal tools