C++ or C# better for .net programming?

Discussion about everything. New games, 3d math, development tips...
Post Reply
Lil Margin
Posts: 212
Joined: Sun Jul 19, 2009 4:24 am
Location: Netherlands Antilles, Curacao

C++ or C# better for .net programming?

Post by Lil Margin »

I never tried C#, from times to times i make some applications in .Net and i was wondering if C++ or C# is more suited for the job.
Pleas tell me which one and why its better then the other in terms of .Net programming.
kazymjir
Posts: 727
Joined: Sat Feb 20, 2010 4:05 pm
Location: Munich, Bayern

Post by kazymjir »

C# was created to use with .NET, C++ not :)

I used C# bout year ago. It's good language to code under Windows enviroment (open GNU/Linux stuff for .NET currently sux a bit).
Used with Visual Studio giving it big power in programming, it can catch bugs before you even start running code.
C# is good for typical GUI desktop applications (anyway, you can code with it and .NET apps for Silverlight and ASP.NET).
I remember that I coded in C# .NET a little bot for social portal, that was logging in, next visiting profiles, adding comments, sending PMs in about one hour with beauty GUI :D
Good language, you can code very fast.
haffax
Posts: 13
Joined: Wed Jul 29, 2009 1:40 pm

Post by haffax »

C# is better in almost all aspects when programming .Net.
You have for instance linq and lambdas both of which are AFAIK not nativly supported by managed C++.

Also many CLI features that are at the foundation of .Net like garbage collection and delegates are tacked onto C++ which makes them feel clunky. C# on the other hand has been designed with exactly these features in mind and thus supports them more organically.

Also Visual Studio has much better C# than C++ support.
Even if you are a fluent C++ programmer you have to relearn some aspects and learning them with C# is probably still easier.
kazymjir
Posts: 727
Joined: Sat Feb 20, 2010 4:05 pm
Location: Munich, Bayern

Post by kazymjir »

Yes, as Haffax said, you can easily learn C# if you know basics of C++.
If you want to start fun with .NET, use C#.
slavik262
Posts: 753
Joined: Sun Nov 22, 2009 9:25 pm
Location: Wisconsin, USA

Post by slavik262 »

Like the others have said, since C# was developed for .NET, it works a lot better with the framework. I don't really see any point in using C++.NET, since C++ was designed to be a lower level language than C#. C# will do a good deal of work for you that C++ will not.

On a side note, C# makes it incredibly easy to link C/C++ DLLs into your project.
Sylence
Posts: 725
Joined: Sat Mar 03, 2007 9:01 pm
Location: Germany
Contact:

Post by Sylence »

C++/CLI is one of the ugliest languages I've ever seen.
So this is one mor vote for C#

Imho Visual Studio's IntelliSense for C# is even better than Visual Assist X for C++
Software documentation is like sex. If it's good you want more. If it's bad it's better than nothing.
Post Reply