Advantages of C# over C++

Please support our C# advertiser: Intel Parallel Studio Home
Reply

Join Date: Dec 2008
Posts: 47
Reputation: gsingh2011 is an unknown quantity at this point 
Solved Threads: 0
gsingh2011 gsingh2011 is offline Offline
Light Poster

Advantages of C# over C++

 
0
  #1
Jan 26th, 2009
Hi, what are the advantages of C# over C++? I have a little bit of knowledge in both of them, but I am going to choose which one to dedicate most of my time to.
Reply With Quote Quick reply to this message  
Join Date: Jun 2005
Posts: 2,039
Reputation: Rashakil Fol is just really nice Rashakil Fol is just really nice Rashakil Fol is just really nice Rashakil Fol is just really nice 
Solved Threads: 139
Team Colleague
Rashakil Fol's Avatar
Rashakil Fol Rashakil Fol is offline Offline
Super Senior Demiposter

Re: Advantages of C# over C++

 
0
  #2
Jan 26th, 2009
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.
Last edited by Rashakil Fol; Jan 26th, 2009 at 11:38 pm.
Reply With Quote Quick reply to this message  
Join Date: Aug 2008
Posts: 1,735
Reputation: LizR has a spectacular aura about LizR has a spectacular aura about 
Solved Threads: 186
LizR LizR is offline Offline
Posting Virtuoso

Re: Advantages of C# over C++

 
0
  #3
Jan 27th, 2009
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.
Reply With Quote Quick reply to this message  
Join Date: Nov 2008
Posts: 44
Reputation: hieuuk is an unknown quantity at this point 
Solved Threads: 4
hieuuk hieuuk is offline Offline
Light Poster

Re: Advantages of C# over C++

 
0
  #4
Jan 27th, 2009
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
Reply With Quote Quick reply to this message  
Join Date: Aug 2006
Posts: 2,065
Reputation: Ramy Mahrous is just really nice Ramy Mahrous is just really nice Ramy Mahrous is just really nice Ramy Mahrous is just really nice 
Solved Threads: 256
Featured Poster
Ramy Mahrous's Avatar
Ramy Mahrous Ramy Mahrous is offline Offline
Postaholic

Re: Advantages of C# over C++

 
0
  #5
Jan 27th, 2009
For business applications (Database as backend) 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
Reply With Quote Quick reply to this message  
Join Date: Oct 2008
Posts: 1,912
Reputation: ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of 
Solved Threads: 274
ddanbe's Avatar
ddanbe ddanbe is offline Offline
Posting Virtuoso

Re: Advantages of C# over C++

 
0
  #6
Jan 27th, 2009
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.
Today is a gift, that's why it is called "The Present".
Make love, no war. Cave ab homine unius libri.
Danny
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC