16 Replies - 3751 Views - Last Post: 08 August 2011 - 03:03 PM
#1
Did I make the mistake of choosing to learn C# over C++?
Posted 05 August 2011 - 08:56 PM
I would like to hear your definitions of what C# is, and what is it used for in business. Also, why are most graphic-intensive games written in C/C++? What are the advantages of those? I don't understand how having to take care of memory usage helps games run faster.
Help me understand what C# is for!
Thanks!
Replies To: Did I make the mistake of choosing to learn C# over C++?
#2
Re: Did I make the mistake of choosing to learn C# over C++?
Posted 05 August 2011 - 10:07 PM
#3
Re: Did I make the mistake of choosing to learn C# over C++?
Posted 05 August 2011 - 10:56 PM
C# is .NET complaint language supported by Microsoft.
People might have different concepts of what it is but maybe you can think of it as a vehicle to a software platform to make leasieriser such as
- Interoperability with existing code
- Supports multiple languages including C#
- A common runtime engine shared by all .NET languages
- Complete language integration
- Comprehensive base library
- Simple deployment model
For example a simple set of instructions to add 2 and 6
C#
int x = 2;
int y = 4;
int total = x + y; and VB
and VB
Dim x As Integer = 2
Dim y As Integer = 6
Dim total As Integer = x + y
They are compiled into IL(intermediate language) that CLR will run and handle
So we could go deeper and write it like this
Quote
//--- Push 2 on stack as int32
stloc.0 //Store into local Variable 0
//--- Pop value from stack into local variable 0
ldc.i4.4 //Load Constant int32 4
//--- Push 4 on stack as int32
stloc.1 //Store into local Variable 1
//--- Pop value from stack into local variable 1
ldloc.0 //Load local varaible 0 onto evaluation stack
//--- Load local variabvariableo stack
ldloc.1 //Load local varaible 1 onto evaluation stack
//--- Load local variable 1 onto stack
add
//--- Add
stloc.2 //Store into local Variable 2
//--- Pop value from stack ivariablel variable 2
ldloc.2 //Load local varaible 2 onto evaluation stack
//--- Load local variable 2 onto stack
another level deeper to (and in C# you can not create global variables but you can in CIL)
Quote
0x0A //stloc.0
0x1A //ldc.i4.4
0x0B //stloc.1
0x06 //ldloc.0
0x07 //ldloc.1
0x58 //add
0x0C //stloc.2
0x08 //ldloc.2
So your VB.Nofficially# or whatever gets compiled to CIL or MIL or IL(I think it is offically called CIL)
That your Jit's compile down to machine code.
Yes with C# is less portable but you can build desktop, deasilye, web, game and many other applications and work with each of Floridaisly with one technology.
I do nexperiencedout your area but here in Flordia 4 out 5 jobs posted are wanting expirecend .NET, ASP.NET, SQL Server developers.
Did you make a mistake?
I would say yes that you should also learn C++
If you choose C++ I would say you made a mistake and should learn C#.
So I think you making a mistake thinking you might be making a mistake.
It is not learning C# but learning the framework that is valuable.
If you learned C++ and VB.NET you would pick up C# in a weekend due to knowledge of the framework from VB.
It boils down to 1's and 0's and programming languages just give you another way express it.
#4
Re: Did I make the mistake of choosing to learn C# over C++?
Posted 06 August 2011 - 06:06 AM
AVReidy, on 05 August 2011 - 09:56 PM, said:
Its for writing programs.
Now whether it is the best choice for your programs, for your needs, for your application...
Nobody here can say.
It has served us well for years. We make applications that take/display/sell photos for amusement parks. Ya, know when you go down a roller coaster, then see your photo on a big display wall, then buy it at the counter... That's us.
All the consumer programs that come from Canon on the CD when you buy a DSLR are written in C#.
I've seen MANY POS/kiosk applications that were C#.
Quote
If your need is to write mobile applications for cell phones, then C# is not the choice.
But if your need is to write desktop/server/workstation applications on Windows... Then C# should serve you well.
#5
Re: Did I make the mistake of choosing to learn C# over C++?
Posted 06 August 2011 - 06:22 AM
Quote
It all depends on what your local job market is like. Here in Bolivia, where I live, if the job requires the application to run on Windows 19 times out of 20 the employers want it in .NET.
Currently I'm trying to push the envelope for ASP.Net MVC3. Most shops here just use Webforms, but for my projects I use MVC3 in hopes that it'll catch on.
.NET is a FULL stack. It's gigantic. It'll take YEARS before you can become a master.
With .NET (and you can use C#), you can make:
Windows Phone 7 apps.
Desktop applications.
Rich internet application (Silverlight)
Server applications.
Services for other applications to use.
Do you see how enormous it is?
I think this questions is kind of flaimbait to be quite honest.
#6
Re: Did I make the mistake of choosing to learn C# over C++?
Posted 06 August 2011 - 01:52 PM
If I didn't take the time out to learn C# on my own while I was in school, I probably would of had to move a great distance to find a job. I think I saw maybe one c++ dev. position out of about 30 jobs.
In my opinion, if you learn C#, you pretty much know the basics of C++.
#7
Re: Did I make the mistake of choosing to learn C# over C++?
Posted 06 August 2011 - 02:12 PM
#8
Re: Did I make the mistake of choosing to learn C# over C++?
Posted 06 August 2011 - 02:19 PM
What you learn when learning a language is the syntax rules for it, logic is the same everywhere, just with a different way of writing it.
So do learn C#, I was stubborn a few years ago, and I thought C++ was everything, and as soon as I started learning C# + .Net I realized it's not just any language, it a giant framework where anything is possible, possibilities are endless.
My recommendation is to learn C# + .Net and if you need to you will easily learn any other language you need to know such as C/C++, Java, and many others.
#9
Re: Did I make the mistake of choosing to learn C# over C++?
Posted 06 August 2011 - 02:31 PM
tlhIn`toq, on 06 August 2011 - 06:06 AM, said:
You can write mobile applications for cell phones for Windows 7, Android, and iOS based phones in C#. See MonoDroid
This post has been edited by Momerath: 06 August 2011 - 02:32 PM
#10
Re: Did I make the mistake of choosing to learn C# over C++?
Posted 06 August 2011 - 03:02 PM
Momerath, on 06 August 2011 - 03:31 PM, said:
I guess I barely consider that writing for a phone. Its more like writing for Windows with a very limited screen size. Kinda like writing for a WindowsCE based PDA. Which is not meant to diminish what WinPhone7 developers do. Its rather nice to be able to take years of learning and apply it to a different device rather than start over. Personally I'm an iPhone fan so I probably won't be doing anything with WinPhone7 any time soon, though I would like to dabble with it in my free time: Which is scheduled for May 2024 given my current work load.
Quote
That's not writing for iOS. For iPhone and iPad you write it objective-C.
Mono is shoe-horning .NET into a device that really wasn't meant for it.
Kinda like going grocery shopping in an 18 wheeler. It gets the job done, but its not the right way to do it.
#11
Re: Did I make the mistake of choosing to learn C# over C++?
Posted 06 August 2011 - 06:52 PM
Quote
Not really anymore. It used to be for WinMo, but for WinPhone7 it's a lot more like developing for silverlight (well, it is silverlight).
And there's MonoTouch for iOS development. There have been a few good apps produced with it that I know of. It's not really shoehorning, I believe it emits an actual iOS executable, it just uses a different language to create it.
#12
Re: Did I make the mistake of choosing to learn C# over C++?
Posted 06 August 2011 - 10:59 PM
assiance, on 06 August 2011 - 02:52 PM, said:
i INCREDIBLY disagree with that statement. if you know c#, you know the principles of OOP. you don't know jack about pointers or generic programming which is critical for c++(among a million other things).
#13
Re: Did I make the mistake of choosing to learn C# over C++?
Posted 06 August 2011 - 11:19 PM
#14
Re: Did I make the mistake of choosing to learn C# over C++?
Posted 07 August 2011 - 12:47 AM
The Architect 2.0, on 07 August 2011 - 12:59 AM, said:
assiance, on 06 August 2011 - 02:52 PM, said:
i INCREDIBLY disagree with that statement. if you know c#, you know the principles of OOP. you don't know jack about pointers or generic programming which is critical for c++(among a million other things).
You are correct about this yes, however If you know C#, it will be much more easier for you to learn C++, due to already having a solid or even working foundation of how OOP programming works, which will make it much more easier to learn C++, than it is without having any foundation whatsoever.
However everyone has their own learning style, for some people it may be easier to learn C++ or even C before going on for C#, or even I know of some people who have went with Java and upgraded from there.
#15
Re: Did I make the mistake of choosing to learn C# over C++?
Posted 07 August 2011 - 08:48 PM
|
|

New Topic/Question
Reply



MultiQuote






|