If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register or Login
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

[RESOLVED] C# vs Managed C++

Hi,

I have programmed in C++ before .NET came and then switched to C# and liked the language. What I would like to explore is whether I have missed anything in not programming in Managed C++.

Putting it more specifically-
1) Performance related : Do managed applications written in Managed C++ run faster than the same application written in C#?
2) Feature set : Is there any useful features in Managed C++ which are not available in C#?

It would be nice if the Microsoft people share their thoughts on this.

Re: C# vs Managed C++

>>1) Performance related : Do managed applications written in Managed C++ run faster than the same application written in C#?<<

Managed code written in C++/CLI does tend to perform better than similar code written in C#, as the C++ compiler's optimization technology is more sophisticated. However, your mileage will certainly vary depending on the specific scenario.

>>2) Feature set : Is there any useful features in Managed C++ which are not available in C#?<<

Templates and deterministic finalization are two biggies, but the ability to seamlessly interoperate with native code is perhaps the most compelling feature.

Re: C# vs Managed C++

Thanks for your reply Steve!

About feature set- I thought C++ templates are the same as generics which C# 2.0 has. Also, do you really have deterministic finalization in managed C++? I thought the CLR doesn't support deterministic finalization.

About performance : Can you give links to any bench mark studies done for comparing the performances? I ask as this question (about performance between C# and C++) is always troubling me and I would like to explore it.