Home > Articles > Programming > C#

  • Print
  • + Share This
Like this article? We recommend

Like this article? We recommend

C++ Versus C#

So, you've seen some more code ported from C++ into C#. As you can see, it's not overly difficult to convert code like this. It's even possible that some bright open source programmer will create a translation tool to take a lot of the grunt work out of C++ to C# conversion! As you might have seen in my earlier article about C++ to C# migration, you can if you mix and match these two languages to a limited extent. For example, high-performance C++ can be retained in total and incorporated into a C# codebase. Even pointer manipulation can be carried out using the amusingly named unsafe keyword. C++ and C# code doesn't have to live apart—the two languages can enjoy a happy productive marriage!

In regard to inheritance and polymorphism, the two languages are pretty similar in capability. I prefer the more condensed syntax of C#, and the lack of destructor code definitely helps speed up the development process. Just as in C++, you can call constructors in base C# classes. Also, polymorphism is well supported in C#.

  • + Share This
  • 🔖 Save To Your Account