sham_huss

Hi i am doing a project and wondering if someone could provide me with some fact based information on the advantages of C# over C++.


Thanks


Re: Visual C# General C# advantages over C++

Matt Linscott

better learning curve! Smile



Re: Visual C# General C# advantages over C++

theTroll527

In my opinion the biggest advantage is Garbage Collection. You don't have to worry about deallocation memory and possibly causing memory links.

theTroll




Re: Visual C# General C# advantages over C++

IsshouFuuraibou

Managed memory...

There are many differences between C# and C++, whether they are advantages or not depends on your perspective.

For example some would see it as an advantage to disallow multiple inheritance without the use of interfaces because it completely avoid even allowing the diamond problem. Where others would prefer to allow multiple inheritance and have a solution to the diamond problem build into the language (as is in C++).





Re: Visual C# General C# advantages over C++

sham_huss

In general really, so far i have these

  • .Net framework (access to thousands of classes that you will not have to create)
  • Friendly
  • No buffer overflow
  • Memory management

anymore





Re: Visual C# General C# advantages over C++

IsshouFuuraibou

Remove .Net framework from the list... there is C++.net that can access the .Net framework. Unless of course you're comparing against C++ from before .Net

Things that CAN be advantages:
  • Type Safety
  • Bounds checking (for more than just buffer overflow)
  • Partial Classes (C# 2.0)
  • Extensible Methods (C# 3.0, not out yet)
  • Anonymous variables (C# 3.0, not out yet)
  • Generics ( .Net addition, so C++.Net also has this )
Here is two great resources
C# Compendium: C# vs C++
C# for C++ Developers

A simple C# vs C++ search on msdn2.microsoft.com, other search engines will return a wider variety of results, will give you most of the information you're looking for.





Re: Visual C# General C# advantages over C++

OmegaMan

The ability not to go through version / dll hell by being able to have differing .Net versions upon a system simultaneously.





Re: Visual C# General C# advantages over C++

abcdefgqwerty2

There are tons of differences and many advantages and disadvantages. Garbage collection is a major advantage. C# is much cleaner and easier to use syntax wise then c++ just because it was built ground up for full OOP. That being said c++ has advantages over c#. One major advantage is c++ has pointers and there is a lot of c++ code like COM objects still out there. Yes you can import and interop *** back and forth, but its easier to just program it in c++ a lot of times if its complex enough. In my opinion c++ is easier to program low level stuff in then c#. You can do it in c# too which is what makes it worth anything as a language, but I think its easier to do in c++.