| | |
Advantages of C# over C++
Please support our C# advertiser: Intel Parallel Studio Home
![]() |
Garbage collection is the most important, and outweighs the combination of all other advantages.
C# has anonymous functions, i.e. closures, which outweighs the combination of all the advantages below.
C# has an actual module system.
C# has generics, which are more powerful in some ways than C++'s compile-time template system, and less powerful in others -- I would describe them as a little bit less verbose.
C# has extension methods which are cute but only a minor advantage.
You get a little bit more certainty about the various primitive data types -- you know that an int is an Int32.
Did I mention garbage collection?
Unless you're doing low-level numerical computation where processor time is the limiting factor, or unless you're using a lot of C++ libraries, C# is preferable.
Another advantage of C# is that you can use better languages that run on .NET too, like F#, and other languages, like Boo.
C# has anonymous functions, i.e. closures, which outweighs the combination of all the advantages below.
C# has an actual module system.
C# has generics, which are more powerful in some ways than C++'s compile-time template system, and less powerful in others -- I would describe them as a little bit less verbose.
C# has extension methods which are cute but only a minor advantage.
You get a little bit more certainty about the various primitive data types -- you know that an int is an Int32.
Did I mention garbage collection?
Unless you're doing low-level numerical computation where processor time is the limiting factor, or unless you're using a lot of C++ libraries, C# is preferable.
Another advantage of C# is that you can use better languages that run on .NET too, like F#, and other languages, like Boo.
Last edited by Rashakil Fol; Jan 26th, 2009 at 11:38 pm.
•
•
Join Date: Aug 2008
Posts: 1,735
Reputation:
Solved Threads: 186
c# is great but, it truly depends what you're going to code as to what you would probably best learning whats right for us isnt necessarily right for you
Did I just hear "You gotta help us, Doc. We've tried nothin' and we're all out of ideas" ? Is this you? Dont let this be you! I will put in as much effort as you seem to.
•
•
Join Date: Nov 2008
Posts: 44
Reputation:
Solved Threads: 4
I used both. It's two different languages for two different purposes. For normal app company system, I just use C#. For something require extra power ex graphic editor or game, sometime I use C++.
.Net Developer - 3D Game Designer
My Portfolio/Blog: http://www.hieu.co.uk
My Portfolio/Blog: http://www.hieu.co.uk
For business applications (Database as backend) C# is better
For learning and teaching students what the programming is; C++ is better.
For learning and teaching students what the programming is; C++ is better.
BI Developer | LINKdotNET
B.Sc Computer Science, Helwan University
Technical blog | http://ramymahrous.wordpress.com
LinkedIn | http://www.linkedin.com/in/ramymahrous
B.Sc Computer Science, Helwan University
Technical blog | http://ramymahrous.wordpress.com
LinkedIn | http://www.linkedin.com/in/ramymahrous
Besides what has been said. C# is more strict that C++.
e.g.: in C# you MUST have a boolean or expression that evaluates to a boolean after an if or while statement, in C++ you can also use integers like 0 or 1 for that.
e.g.: in C# you MUST have a boolean or expression that evaluates to a boolean after an if or while statement, in C++ you can also use integers like 0 or 1 for that.
Today is a gift, that's why it is called "The Present".
Make love, no war. Cave ab homine unius libri.
Danny
Make love, no war. Cave ab homine unius libri.
Danny
![]() |
Similar Threads
- Advantages of an interprocess communication based on XML files (C++)
- What are the advantages of having three-level database architecture (Database Design)
- Advantages of an interprocess communication based on XML files (XML, XSLT and XPATH)
- What's better? Windows 2000 Server or Linux Server? (Windows Servers and IIS)
- 5 Advantages of Using Procedures Within Pascal Programming? (Pascal and Delphi)
- learning php (PHP)
- MySQL vs. PostgreSQL (MySQL)
Other Threads in the C# Forum
- Previous Thread: redrawing panel
- Next Thread: What version of C# do you work with?
| Thread Tools | Search this Thread |
.net access algorithm array barchart bitmap box broadcast c# check checkbox client combobox control conversion csharp custom cyclethruopenforms data database datagrid datagridview dataset date/time datetime degrees development draganddrop drawing encryption enum event excel file filename finalyearproject form format forms function gdi+ getoutlookcontactusinfcsvfile gis globalization gtk httpwebrequest image index input install installer java label list listbox mandelbrot math mono mouseclick mysql operator panel path photoshop picturebox pixelinversion post programming radians regex remoting richtextbox save server silverlight sleep socket sql sql-server statistics stream string table text textbox thread time timer timespan update usercontrol users validate validation visualstudio webbrowser windows winforms wpf xml






