CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5

Hybrid View

  1. #1
    Join Date
    Jul 2005
    Posts
    5

    [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.

    Thanks,
    - Manoj Agarwal

  2. #2
    Join Date
    Jun 2006
    Posts
    17

    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.

    Thanks,

    Steve Teixeira
    Group Program Manager
    Visual C++

  3. #3
    Join Date
    Jul 2005
    Posts
    5

    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.

    Steve- can you pl elobrate on above.

    Thanks,
    - Manoj

  4. #4
    Join Date
    Sep 2000
    Location
    Indianapolis
    Posts
    6,754

    Re: C# vs Managed C++

    Here are a couple of articles on the Codeguru site that I thought I'd mention since they relate to this thread:

    Comparing .NET Generics and C++ Templates
    http://www.codeguru.com/columns/expe...cle.php/c7423/

    STL.NET: Combining Generics and Templates

    http://www.codeguru.com/columns/kate...le.php/c10297/

    Brad!
    -----------------------------------------------
    Brad! Jones,
    Yowza Publishing
    LotsOfSoftware, LLC

    -----------------------------------------------

  5. #5
    Join Date
    Jun 2006
    Posts
    6

    Re: C# vs Managed C++

    And one from Brandon Bray on the same topic:

    http://blogs.msdn.com/branbray/archi.../19/51023.aspx

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured