Computer Forums

Member Login

Remember Me? Sign Up! | Forgot Password
 
Slogan
 
Closed Thread
Old 12-16-2005, 02:29 PM   #1 (permalink)
 
True Techie

Join Date: Nov 2004

Posts: 133

duncan

Default C# and C++ difference

Can anyone who knows C# and C++ well summarise the differences for me please. I know C++ but have just been given a big fat Visual C#.Net book and don't want to spend a lot of time finding out if it isn't a particularly good language etc..

Appreciate any info. on pro's and cons.....
duncan is offline  
Old 12-16-2005, 05:35 PM   #2 (permalink)
 
Ultra Techie

Join Date: Jul 2005

Posts: 530

TheHeadFL

Send a message via AIM to TheHeadFL
Default

Its a lot like Java... but with most of the good features of C++.

Honestly, itll take you 20 minutes to pick up most of the differences, tops.

The biggest thing is that all the "standard libraries" are used in hierarchical form now. Eg... System.Console.WriteLine() etc.
__________________
Desktop machine: 2 x Opteron 246, Asus K8N-DL, 2GB PC3200 ECC Reg., XFX GeForce 6600GT, 74gb WD Raptor, 2 x 19\" LCDs, Windows XP x64
Server machine: Intel P4 3.0GHz 2MB EM64T, ECS i865pe, 1GB PC3200, 36gb WD Raptor, Windows Server 2003
Laptop: Dell Inspiron 9100 (Intel P4 3.2GHz 1MB Prescott, i865pe, 512MB PC3200, Mobility Radeon 9700, DVD+R/DL Burner), Windows XP
Linux: P3 450Mhz, 386MB ram, Slackware 10.1 (Running mySQL/Apache)
TheHeadFL is offline  
Old 01-02-2006, 11:55 PM   #3 (permalink)
 
Newb Techie

Join Date: Dec 2005

Posts: 19

fuller9779

Default

microsoft basically stole java added some stuff and named it c#. if you know java you will pick up on c# quickly.

there's alot of subtle differeneces but the large differences that i can think of right now are:

everything in c# is an object. even the primitive types like int, double, float, etc are objects.

like java there are no pointers. there are references to objects. however c# allows you still use pointers if you want...

like java, c# has a garbage collector. so u don't have to write destructors to clean up dangling pointers and such.

u can use all the .net classes microsoft provides. such as collections. which if you know java are great!

the pro would be the language is much like java plus some! plus it has all the microsoft magic.

the only cons would be it is microsoft and it costs money.
fuller9779 is offline  
Old 01-05-2006, 02:31 AM   #4 (permalink)
 
Super Techie

Join Date: Mar 2003

Posts: 337

shdwsclan

Send a message via AIM to shdwsclan
Default

To add to and clear up the previous post.

There are really no cons to C#.
C# is a very versatile, high level language that really put c++ to shame. J#, or java demonstrated OOP as it should be. Unfortuantely, java is an interpreted language.

C# is a blend of all the previous programming languages including cobalt and fortran. C# has removed the need for other compiled programming languages. C# is derived a lot from java and many programmers(like me) who were started off in java will find C# as a cozy home. Using the + as a concoconator(i think thats how you spell it) and plus sign would probably be the final java touch.

Microsoft does not own C#, same with b,vb,c,c++,c#.
C# is free, as every library is free because it has to be.
All programming languages are free.

Microsoft,apple,linux,delphi....all provide an ide and compiler.
There are definetly more provides, there are even free compilers and IDEs.

The misconception that microsoft owns C# but thats like saying britain owns english and we need to pay to speak it.

The truth is that microsoft provides the most popular IDE and compile and the IDE is very crappy(especially if you have used eclipse).

Delphi is also very popular.
shdwsclan is offline  
 
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On