Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to learn the C# language and I was wondering if prior knowledge of C++ would make it easier to learn? I have a large background in Java and am currently programming in (and therefore constantly improving on) C++. Would knowledge about the C++ syntax and structure help me understand C# more quickly, or is C# more akin to Java?


migration rejected from May 17 '15 at 2:34

This question came from our site for professional and enthusiast programmers. Votes, comments, and answers are locked due to the question being closed here, but it may be eligible for editing and reopening on the site where it originated.

closed as primarily opinion-based by Ixrec, Snowman, GlenH7, durron597, MichaelT May 17 '15 at 2:34

Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise.If this question can be reworded to fit the rules in the help center, please edit the question.

If you know how to think like an OO programmer, it shouldn't be very difficult. – PostMan May 6 '11 at 7:56
If you know how to avoid thinking like an OO programmer, it would be even simpler. – SK-logic May 6 '11 at 9:58
@SK-Logic, why? – StuperUser May 6 '11 at 10:52
@StuperUser, C++ is a multiparadigm language. Do you see any of the OO ideology in STL? In Boost? There is almost nothing OOP-ish in the mscorlib.dll as well. OO is dangerous because it is limited and limiting, and all the OO zealots keep repeating that this limited way of thinking is applicable to everything. One must understand its limits and apply OO only when necessary (and that kind of cases are extremely rare in practice). – SK-logic May 6 '11 at 12:35
@SK-logic: Then how do you define "OO ideology"? I have - obviously incorrectly - assumed it meant packaging related data and behaviour into objects, utilising the principals of "Inheritance, Encapsulation & Polymorphism" while doing so, where the end goal is to build software solutions. – Binary Worrier May 6 '11 at 13:35

If you want to learn C#, start developing in C#.

A lot of the useful effort will go to learning the .NET framework rather than the syntax, which will seem familiar with your knowledge from Java.

Have a look at C# in Depth which should keep you entertained and educated for a few years while you're learning.


No. If your intention is to only learn C# and you think of C++ as a beginners guide to C# you are wrong. C# is a lot more simpler than C++ in terms of refrences and (absense of)pointers. You will first learn C++ and its associated dangers and then learn how to "solve them" in C#.You will first learn what a "friend" is in C++ and then learn that it isnt present in c#. Then you will want to wonder why it wasnt included in C# . Save yourself the trouble and learn C# directly

lol, so don't learn C++ because when you go to C# you'll keep on thinking 'I wish I could use friend, multiple interitance, templates etc' and get annoyed at the limitations. Nice answer :) – gbjbaanb May 6 '11 at 13:24

With respect to learning C#, C++ will hardly add anything to Java (without adding junk, like low level pointy stuff, with it). Beyond the superficial syntactic similarities , C# and C++ models are worlds apart.

The OP is working in C++. I wouldn't recommend learning C++ just as a prerequisite to another language, but that's not the question here. – David Thornley May 6 '11 at 13:55
O ... thanks for the correction. I refine my answer – explorest May 7 '11 at 8:10

Not the answer you're looking for? Browse other questions tagged or ask your own question.