• 0

Whats the difference between C# an C++?


Question

10 answers to this question

Recommended Posts

  • 0

A lot.

C# is managed, meaning it runs on the .NET Framework, which has numerous services and classes used by the language. C++ is naitive code, which runs directly on the CPU.

C# is completely object-oriented, C++ is not.

C# is a RAD (Rapid Application Development) language, C++ is not.

Link to comment
Share on other sites

  • 0

Borland's C++ Builder Enterprise Ed. has RAD support.

C++:
     Pros:
          Runs as binaries
          Is usually cross platform capatable
          2nd Most powerful programming language (ASM is the most powerful)
          Can use ASM code inside of C++ code (Requires a Compile that supports Inline ASM)
          Like 100x faster than C# could ever be
     Cons:
          A lot to learn, takes awhile to get used to
          Writing W32/MFC apps can get ugly..IMO
C#:
     Pros:
          Easy to learn
          has C like syntax
          Has support for ASP.NET
          W32 is all done in a RAD
          Full OOP support
     Cons:
          Can't be compared to C++ when it comes to processor intensive tasks .. like games
          Have to worry about MS and Security
          Slow cause it has to load the .NET modules needed for the program
          the .NET Framework is required on the client computer

Link to comment
Share on other sites

  • 0

actually its not entrirely true that you "have" to worry about ms when dealling w/ C#. in fact you don't "need" .net to be installed to use C#, instead you can use Mono which an open source implementation of .net and still have access to C# the same way you would w/ .net and then some.

Link to comment
Share on other sites

  • 0
C# is completely object-oriented, C++ is not.

C# is a RAD (Rapid Application Development) language, C++ is not.

I thought C++ was object oriented? What do you mean by completely then?

Also, can you briefly explain RAD? Thanks.

Link to comment
Share on other sites

  • 0

Is C# only availaible trough .Net (not counting Mono and others, they are .Net reimplemented)? I thought C# could be compiled like C++ (no intermediate language to .NET, if you create native apps). Does that mean that C# couldnt be used in Linux without Mono or other .Net clone (don't argue, i know it's not exactly a clone, or is it? )?

Just to answer last post: RAD is Rapid Application Development, like Delphi and .Net. It's somewhat an application framework in wich you only worries about your program and not about how to implement it. Think about C++ in which you have to write almost everything to have an application running, especially with databases, and you'll see what is RAD.

airmind

Link to comment
Share on other sites

  • 0
I thought C++ was object oriented? What do you mean by completely then?

C++ has the ability to use OO or standard procedural programming. The choice is up to you. C# requires you to use OO everywhere. On a side note, everything in .NET (and therefore C#) is an object.

Is C# only availaible trough .Net (not counting Mono and others, they are .Net reimplemented)? I thought C# could be compiled like C++ (no intermediate language to .NET, if you create native apps). Does that mean that C# couldnt be used in Linux without Mono or other .Net clone (don't argue, i know it's not exactly a clone, or is it? )?

C# and .NET go hand in hand. You can't use C# without using .NET. From what I understand, you can "compile" it and bypass the JIT compiler, but it will still require the .NET framework (or Mono).

Link to comment
Share on other sites

  • 0

you can not use C# on its own. You need either the .net framework or the mono framework., C# isn't compiled down to binary code, rather into IL which is then interpreted by the JIT.

Link to comment
Share on other sites

  • 0
you can not use C# on its own. You need either the .net framework or the mono framework., C# isn't compiled down to binary code, rather into IL which is then interpreted by the JIT.

It's not interpreted. It's compiled to machine language by the JIT compiler. You always get native binaries in memory.

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.