[RESOLVED] C++/CLI and C#
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: [RESOLVED] C++/CLI and C#

  1. #1
    Join Date
    Jun 2006
    Posts
    16

    [RESOLVED] C++/CLI and C#

    When it comes to developing Windows Forms Applications, what is more powerful out of C++/CLI and C#?Microsoft state on MSDN that C++/CLI is the most powerful .NET Language,but i wish to know what makes it more productive and powerful than C#.
    I have also been told that C++/CLI Applications run faster than C# ones, is this true?I dont understand how a C++/CLI Application can run faster than a C# Application when .NET Languages are supposed to be compiled to MIL and run at the same speed



    Thanks
    Last edited by Microsoftlover; June 23rd, 2006 at 12:11 AM.
    Share on Google+

  2. #2
    Join Date
    May 2006
    Posts
    17

    Re: C++/CLI and C#

    Hi,

    Both languages are about equally powerful in this context. The biggest strength of C++ is evident when you need to also use OS functionality that is only exposed as native or COM APIs since you can just call them. The biggest strength of C# is that it is a simpler language with a build model that allows for easier tools support.

    C++/CLI code tends to be faster for 2 different reasons:
    1) Writing identical code and running it on x86 is up to a few percent faster in some cases because we run the optimizer when emitting MSIL code to compensate for some analysis the x86 JIT compiler is not able to do. On x64 the difference is less.
    2) Some patterns that are much more natural in C++/CLI like using our deterministic finalization avoid putting undue pressure on the garbage collector and in some cases that can have dramatically positive performance effects. In C#you can obtain the same effect through using blocks or by explicitely calling Dispose in a finally clause, but that code is not the natiral way to write it in C#.

    Ronald Laeremans
    Acting Product Unit Manager
    Visual C++ Team
    Share on Google+

  3. #3
    Join Date
    Jun 2006
    Posts
    16

    Re: C++/CLI and C#

    Thanks, looks like im staying with C++/CLI then..C++/CLI community is slowly getting big aswell even though its only been approx.6 months since C++/CLI's official release.
    Share on Google+

Posting Permissions

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


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center