Click here to Skip to main content
15,891,033 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Well I've passed the course Introduction To Programming in the last semester, now i am enrolled in the course Object Oriented Programming.

Actually i want to learn C# (also java)

What You Say About C# And Programming in C# .. ?
Last year a competition on programming is organized by my university where the students from different universities participated, but at that point when the groups are busy to solve the problems i note that those who program in C# is a little bit better in all aspects then C++ coders.

In My University computer sciences students just hands on C++ . . . :/

I keenly Awaiting Your Suggestions Also Please Recommend Some Self Studying Books On C#..
Posted
Updated 4-Mar-13 4:30am
v6
Comments
I guess you should add this in some discussion forums.
[no name] 4-Mar-13 10:27am    
Where on earth did you get the idea that C++ is not used professionally? Recommendations might vastly differ based on what it is that you want to study.
Usman Hunjra 4-Mar-13 10:37am    
Question Updated..
bbirajdar 4-Mar-13 11:02am    
OG..Please guide him...

C++ is a great place to start. .NET limits your programming abilities to Windows systems (and anything that can run Mono, but there are idiosyncrasies to learn). C++ gives you a great foundation for programming that you can transfer to C#, Java, etc. Personally my school taught everything in C++ and I'm now a professional .NET programmer. I wouldn't have wanted it any other way, since I can still program in C++ and I know about writing optimized code and how to pay attention to memory and object lifetimes.

BTW, the solution above me has a couple statements that are incorrect...

"Native code is compiled and .NET is not" is not a true statement...

I would suggest that the poster looks up how the .NET runtime JIT's code. The jitter is native code and has been proven in some (many) aspects to out perform C++ at similar tasks. It's difficult to comprehend, but there are a lot of studies on the net giving hard data to support that.

"C# relies on the .NET framework"

You can cross-compile on Mono (which is technically not the .NET framework). C# is an open standard language, .NET is Microsoft's interpretation of that EMCA standard, Mono is another interpretation of it. Because C# (like C++) is based on a standard (EMCA for C#, ANSI for C++), it can be cross-compiled provided you are not using platform dependent code.

"C# is best for rapid development of small apps ... not suitable for very large apps" (to be fair, he prefixed that with "I think"

I would disagree. I've written a software package in C# that has over 1 million lines of code which is a feature expanded re-write of another software package in C++. We chose C# because it is truly a "rapid application development" language and our tests have proven that the C# version performs the same functions at a lower memory cost and higher throughput.

And his little quote at the bottom would exclude him from a job at my company if that was his tag line in his resume. Especially for somebody who is learning or just getting into development that can be a dangerous statement. I can write highly stable and very fast code that about 5 people in the world could understand. Or I could write the same highly stable and very fast code that just about every programmer should be able to understand. If you only care about performance and stability and neglect maintainability (which is a measure of how easy it is for SOMEBODY ELSE to maintain your code), then you are only doing 50% of your job. The other 50% of your job is making your code easy to work with in the future when you're not around to explain what you were thinking.

Good luck in school, stick with C++ and learn C# in your own time. I would suggest that when you get C++ assignments you do them in C++ first, then try them in C# and VB if you want to compare implementation and sharpen your interpretation skills. Also, once you get into your more advanced classes your teachers will care less about what language you write in and more about the output and method of your software.
 
Share this answer
 
Comments
Captain Price 7-Mar-13 9:59am    
Ohh, You've got me there all there, but " C# version performs the same functions at a lower memory cost and higher throughput...". I would argue !
You are going to get polarised views here, mine should be passed through the filter of 10ish years experience of C#, and 1 year of (non-professional) C++.
Each have their pros and cons as a start point:

C# Relatively simple, pointers and garbage collection are't much of an issue (I've had to use pointers a handful of times) and therefore may make a good starting point. This is also drawback compared to c++ as you are further away from the processor, so you'll learn less how the machine actually works which I found invaluable.

C# experience translates more directly into Java. But transitioning to c++ from c# (or Java) is harder than from c++ to c# (or Java).

C# has a big framework behind it, not sure what the state of play is with c++. This also hides the complexity of the implenentation, so you don't get to see what is going on and therefore learn less.

C# is largely tied to microsoft (though it can be a stepping stone to Java, though just going for Java might be an option).

I found I could achieve more, more quickly with c# but mostly this is to do with the framework and relative simplicity (this is probably why the c# people look better than the c++, a lot is done for them ). If I needed something that really relied on speed or huge scalability, I'd opt for c++.


We principally used c++ at university and I'm glad we did, it gave me a much greater insight into the workings of the machine which is still useful now. In your position I'd continue to use c++, but develop side projects in C#, the more exposure you can get to different languages (and language paradigms) you can get the better. On a more cynical level you can always choose according to the jobs market in your area.
 
Share this answer
 
Comments
Usman Hunjra 8-Mar-13 10:24am    
thanks . . .
Keith Barrow 8-Mar-13 10:35am    
No worries.
Quote:
i note that those who program in C# is a little bit better in all aspects

really... you shouldn't have noticed that, because there's nothings like that to notice. This is C# vs C++ question.

Personally, I think C++ is more computational than C# (In other words; low in level, and it really is). C#'s syntax may be easier for us to comprehend than c++. C# relies on the .NET framework.

So it's another .NET vs Native code question.
Native code is compiled and .NET is not.
So it's another Compiled vs Interpreted...

I think C# is the best for rapid development of small apps, and not suitable for very large apps. C++ is cool but it may take twice as the time it takes to do the same job using C#.

There're 2 things I care about when programming; Performance and Stability
 
Share this answer
 
Comments
Andreas Gieriet 4-Mar-13 16:16pm    
[...]There're 2 things I care about when programming; Performance and Stability[...]
...How about correctness... ;-)
Performance comes quite late, since often it is a rather "elastic" requirement, versus correctness is very rigid.
Andi
Captain Price 5-Mar-13 9:52am    
yeaa... sure

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900