tags:

views:

1447

answers:

19

Hello, Recently I've started to notice a lot of smirks and generally rude comments whenever I mention C#. Everyone I talk to either says learn Python or learn C++.

Python is a nice language, I get it. But I don't find much use for it right now (for my use cases), and C++ I heard is a faster language (not sure).

So my question is this, what advantage can I get from learning C++ (besides the knowledge and expansion of my horizons), when I mainly program in C#.

If anyone can make a legitimate claim, I'll for sure look into learning the language because let's face it, I trust you guys.

Thanks so much for all the help.

+6  A: 

There are reasons to use pretty much any language.

C and C++ have uses in that they are compiled into native code rather than running on a virtual machine. There is a speed advantage and it also means these programs can run without having a 50MB+ framework installed.

Pretty much all games (certainly first person shooters) are written in C or C++.

Is this applicable to you? No idea because I have no idea of what you're trying to achieve.

What will you learn from C or C++? Pointers, memory management and the like. It's quite a different world from more modern garbage collected languages like C#, Java or Python.

cletus
Thanks so much for the answer Cletus. I'm going to mainly be making Windows applications (meaning programs that run in window thingies, not necesarily in the Windows OS). I'm probably not going to delve into game development any time soon.
Sergio Tapia
One VERY important thing to note though. The windows C (and thus C++) API is very very bad. For user interface you are better off using C#. When dealing with GUI and General windows programming it is always better to do the backend libraries in C/C++ and all the GUI/User Interface in C#
Ramon Zarazua
@killerfox: In what way is the windows C API very, very bad? As an old evolving API it obviously contains a lot of legacy features, functions and styles, but does that make it bad?
Charles Bailey
There is no Windows C++ API, but there are several C++ GUI libraries. I use Qt, and I think that it is better than WinForms and that it can compete successfully with WPF.
rpg
+3  A: 

In terms of performance, it is a lot faster. If you have any desire to do game programming or high-performance computing, C++ is a great language for that.

But, I would also say C++ is very difficult to learn. No garbage collector, compile errors that need to be deciphered, and the need for external libraries are all difficulties to overcome.

rlbond
So C++ is good in it's speed, right? There are NO built in functions? (Honest question, I mainly program in C# :P )
Sergio Tapia
Directly built in? No. You have the standrd C library (which is very limited compared to .NET framework), and the STL(C++). These languages follow the Philosophy of building it yourself ;). There are a lot of good third party libraries though, such as QT, and wxWidgets.
Ramon Zarazua
If you're used to coding in C# then it seems that there is hardly any built in functions, but there are libraries that can help you with that; mainly thinking of Boost now.
Chaoz
It's not *that* much faster. It's only about 3x faster according to the Computer Language Benchmarks Game.
ryeguy
C++ has the STL, so there's some stuff there. Stuff C++ does not have built in: GUI, Serialization, Sockets, etc.
rlbond
It often isn't faster *at all*. If you implement the same simple algorithm in C# and C++, without spending hours optimizing either, then I'm willing to bet that the C# version will be faster. It takes a lot of blood, sweat and tears to make C++ go fast. It can be done, but it is certainly not a given.
jalf
It's not about built-in functions. Languages like C, C++ and C# don't really have any built-in functions. The functions that you know are always there in C# are actually part of the CLR. The things that are always there in C (and C++) are part of each of their respective C-runtime libraries (CRT). The speed relates more to the fact that C and C++ compile to native machine code, which runs right on your metal.
Martin
@Martin: So does .NET. It just has another intermediate step. But before your .NET code is actually executed, it too has been compiled to native machine code. It is JIT'ed, not interpreted.
jalf
+4  A: 

You'd get more utility out of learning a functional language like Clojure, Haskel (or maybe F# given you obviously feel comfortable with CLR). They have a different underlying programming model which will expand your horizons in ways that learning a new syntax will not.

In the other direction, learning C would actually be much more useful than learning C++. That will focus your learning on pointers, memory, and 'close to the metal' topics.

Timothy Pratley
yes, if you want to be lynched by any nearby C++ programmers when they see your code. Or you could accept that C and C++ are different languages, and that few people are *less* qualified to write C++ code than a C programmer. But true about functional languages.
jalf
The question was about what can be gained from learning another language. Of course C and C++ are different languages. Notice the *wink*? That's sarcasm spelt out.
Timothy Pratley
I should probably mention that I'm not the one who downvoted you. Anyway, sarcasm or no, I have to disagree with anyone who, even in jest, suggests that learning C allows you to pass for a C++ programmer.
jalf
Fair enough - edited to remove sarcastic comment - sarcasm is lame.
Timothy Pratley
Agree that the true benefit would be learning to code down on the metal.
Ben Fulton
+2  A: 

With every programming language you're able grow your vision of the landscape and apply lessons learned. Although I have never written a production C++ application, it was very educational for me to understand the system at that level. If you have the spare time, dive in! You may also want to explore unsafe C# code. It could help you understand many of the advanced capabilities of C++.

Nescio
+39  A: 

The biggest issues are as follows:

  • C++ is the de facto standard of system AND application programming for the past 20 years
  • C++ is portable and compilers exist for ~ 95% of all processor architectures.
  • C++ can enhance your .NET code, by that I mean PInvoke can be done to run optimized code written in C++ -OR- can be used to run code from 3rd parties, allowing you to write custom wrappers etc.
  • C++ is linux/mac/PSP/Cray II/Random OS from Thailand compliant, it has no issue compiling because it doesn't run through the .NET CLI (which I have to admit is a beautiful piece of art) C# is bound, for now, to Mono implementations and Windows through .NET.

As a professional .NET applications programmer, I love C#, I worship the ground that the architects walked on. But C++ is in my opinion, the most important language you can/will ever learn because it will open more career doors than any other language in the modern industry. If you know C# it will take you a matter of months to learn it. I reccommend Timothy D'Orazi's C++ book if you have an academic software engineering background.

Afterthought: C++ is a tool, just like C# or a drill or a shotgun (arguably) fit the tool to the task, I'd rather die than write functional code in C++, likewise, I wouldn't do application development in F#, they're all fine langauges. Learn something that interests you! If you want to be a better programmer, learn C++, if you want to be a better application developer, it may be more to your advantage to learn new technologies within the framework you're already working in! You are a C# programmer, have you learned WPF? WCF? what about the features of C# 4.0? Have you mastered lambda functions? expression trees? There are so many directions you can go from here, C++ is just one of them. Ask yourself the following questions:

  • What can I learn that will add value to me?
  • What can I learn that will interest me as a developer?
  • What can I learn that will benefit me in my immediate position?
  • What can I learn that will help me get into the kind of career path that I want to be in?

You'll find that there will be many answers that overlap for these questions, take your time, find something that interests you and won't be a chore to learn, you'll thank yourself for it 3 months from now.

Firoso
Updated to add additional information.
Firoso
+ For the after thought. ANY langauge can be learned in a few months, but mastering a language takes years. Look around at the number of "senior" level developers who struggle with concepts such as generic, template, or declaritive programming which are key concepts in C# or C++.
James Schek
Or for that matter, dynamics, variance, lambda expressions, expression trees, anonymous types, and even language independant things such as ADT's, storage/search efficiency, and algorithm analysis.
Firoso
I think C++ is rather de jure than de facto
alsor.net
It's *du jour.* Geez. http://www.merriam-webster.com/dictionary/du%20jour
Robert Harvey
You're confusing C++ for C. Those "nice" language features you described in bullet points belong to C, not C++.
Matt Joiner
erm actually they're both equally valid, however I guess slightly "more true" for C than C++.
Firoso
+1  A: 

It depends what programs you're working on. I've never used Python before, so I can't comment on that.

As for C++; most performance critical software is written in it due to its speed. You have more power over your hardware, but with that power comes responsibility and a steeper learning curve. It also doesn't have access to .NET; so you'll probably have to dig into Win32 programming for doing some of the tasks!

Examples of where C++ is used: Game development, aerospace, air traffic control systems.

Personally, I think that learning C/C++ makes you a better programmer overall, it teaches you many things; especially about performance and memory. And also well.. pretty much everything important is built in C++.

Chaoz
Sounds like an argument to learn C, not C++
Sev
+3  A: 

Regarding C/C++, here are a few things that come to mind out of my own experience.

  1. Learning C/C++ can provide experience working more closely with detailed operating system features and with raw memory. For example, many Audio, Video, and Game applications require this level of access to perform at their best.

  2. Knowing how to interop with components and libraries written in C/C++ is a handy skill. There are many useful libraries out there that still do not have adequate equivalents in C#. TSAPI (telephony), various file format libraries, and legacy components are much easier to work with in C# if you understand their construction in C/C++ and other languages.

  3. If you are working with windows applications, having experience with Win32 through C/C++ allows you to understand how a number of other applications written in non-managed code work; even if you do not have the source code available to you. You can then use P/Invoke more effectively to deal with libraries that would ordinariliy be unavailable or too opaque to handle otherwise.

  4. Many techniques, though potentially black-hat in nature, are tougher to accomplish with C#. Things like DLL substitution, re-writing function entry points, injecting code into other processes, and generating inline assembly code are easier to do with C/C++; though not impossible with C#.

  5. Finally, fine tuned control over un-managed objects is something better suited to code written with C/C++. For example, things like overlapped I/O on windows, some socket library features (ex. UDP Multicast), and device control have more working C/C++ examples out there than C#. But, these are quite esoteric and usually not handled in C# applications anyways. Some of these are likely to have equivalents in future APIs or frameworks as well.

In summary, the main motivation I would suggest for learning C/C++ is to broaden your knowledge of other systems that are not accessible in C#. Learning Python would be a step in the other direction, where learning other styles and semantics of code construction is a more likely benefit. C/C++ code written by other people tends not to have more beneficial nor recognizable patterns like software written in Python, Ruby, or Lisp.

meklarian
+14  A: 

It depends.

The thing I like about C++ is that in some ways, it is a more expressive and yes, more elegant, language than C#. It enables some really nice abstractions (such as generic programming or RAII) that just can't be duplicated in C#.

In those ways, it's an eye-opener. Of course, so are functional languages. So is Python. All of them are worth learning, even if you write all your code in C# now and forever.

Of course, C++ is also an overcomplicated mess, and a far more error-prone language than pretty much anything else. And if you don't know it really well, then it will explode in your face when you least expect it.

Of course, plenty of people will shout PERFORMANCE! when you ask why you should learn C++. I won't. Because in many common cases, C# is going to be as fast or faster as your C++ code. This old exchange between Raymond Chen and Rico Mariani illustrates the performance characteristics of both platforms pretty well.

C++ has the potential to be extremely fast. But it also has a lot of subtle performance pitfalls that mean that most of the time, unless you're some kind of omniscient code-god, your code is going to be less efficient than the equivalent C#.

If you have an interest in programming languages, C++ is a wonderful example of the theory of evolution. ;)

It hasn't grown according to some great predefined plan. It has always improved and adapted one step at a time, according to what would make the language better right now. As a result it is huge, bloated, overly complex, but it is also more expressive than something strictly designed according to a single person's vision, such as C#. C# is designed with an unhealthy obsession with OOP, because that was the cool thing when it was designed.

In C++, OOP sort of drifted out towards the periphery, not so much as a conscious design decision, but because better alternatives turned up.

It's a fun language. And I'd recommend learning it just for the sake of becoming a better programmer. But I'm not convinced that you'll need to actually use it. Of course it will make certain tasks easier (native interop, or programming small programs which for one reason or another can't assume that the .NET framework is installed), but for most cases, you probably won't need it.

That leaves the "become a better programmer" argument, and while that is a valid argument, it is also true for other languages. You should definitely also know a functional language. And Python, or a similar pragmatic, high-level "make it easy for the programmer" kind of language.

jalf
God bless the STL
Gab Royer
This could have been a good comment, but:"overcomplicated mess", "more error-prone language than pretty much anything else". Proof?"unless you're some kind of omniscient code-god, your code is going to be less efficient than the equivalent C#." C++ outruns C# out of the box in most benchmarks I have seen. When C# / Java are just as fast/faster, they are almost certainly using more memory. "huge, bloated, overly complex". Ironically, C# has more features in its core and a larger ISO standard document."OOP sort of drifted out towards the periphery" OOP continues to be essential in C++.
rpg
Are you seriously saying that C++ is *not* overcomplicated? "When C# / Java are just as fast/faster, they are almost certainly using more memory", yes, and you'll note that I never claimed they used less memory than C++. If you don't think C++ is a big and complex language, then one thing is clear: You don't know C++.As for OOP, where is it in the STL? How much is it used in Boost?As for the standard, the one I grabbed from ECMA for C# is 507 pages without the index. C++98 is 703 pages.
jalf
You know what? You're free to be a fanatic language fanboy. Some of us prefer to be a bit more nuanced, and if that makes you dislike my comment, so be it. There's a lot to like about C++, which is why I wrote this answer, but you're doing yourself, and the OP a disservice by pretending that it is some kind of divine perfect language, or that it is simple to use.
jalf
1. I'm arguing against your choice of words, which makes the difference between an acceptable answer and a great one. C++ is complicated, but that is very different from being an "overcomplicated mess" and "more error-prone than pretty much everything else". 2. The STL and Boost are not the entire C++, they are merely a part of it, on equal standing with OOP and not drifted to the periphery: correct me if I'm wrong but classes and encapsulation seem to be quite wide spread in both the STL and Boost... 3. Never said it is perfect, I just think that some of your criticism much too harsh.
rpg
The ricom/chen affair: R. Chen was not experienced with the STL/boost (as he admitted), he used getline and std::string right off the bat and then he dropped down to WinAPI almost immediately. By the time he finished he was using C not C++. R. Chen is a brilliant C coder, but I wouldn't say that he is nearly as good with C++. The language shootout is an ok benchmark, but most of my "proof" comes from 3rd party testimonials, my own programming experience and my experience with using C# software. BTW, both of the times I questioned the C# performance I was called a fanboy, strange...
rpg
C++ is much more complicated than would be necessary if it was redesigned from scratch (as D shows). That makes it overcomplicated. It is also a mess. `vector<bool>` and the `export` keyword come to mind. The almost unparse-able syntax and the way almost every nontrivial program relies on undefined behavior is, I'd say, "a mess". Therefore, overcomplicated mess. I never said that OOP was not used in C++, just that it is no longer the centerpiece of the language. Generic programming (as in STL and Boost) has taken up that role.
jalf
The shootout above obviously isn't the One Holy Truth, but it is representative for most of the examples I've seen. If you search here on SO, you'll also find many questions from people who are surprised that their C++ implementation of some algorithm runs *slower* than the original C#. It is wrong to say that C++ is faster "in general". It can be, when used correctly, and with attention to detail. But it takes a lot of effort, and in most real-world cases, performance will be very similar to the C# equivalent.
jalf
How can "It depends?" be an answer to "What are the advantages of...?" ;)
StackedCrooked
With C++ you're going to have memory leaks and all if you aren't careful, so it can make the code slower than C#. However, since C# is managed, then C# will very well out-run a poorly developed C++ program coming from an unexperienced team. Beside, unless you are making algorithms for in-game physics, speed often isn't the most needed- it's not like you're making Crysis and using more processing power than normal desktops provide!
DMan
DMan: Memory leaks don't generally make code slower. And I don't see what C# being managed has to do with outperforming poorly written C++ programs. "Managed" doesn't mean that there's *another*, more experienced programmer sitting behind the screen psychically detecting what you *meant*, and rewriting your code to do that. If you write bad code, it'll be bad code regardless which language it's written in.
jalf
+29  A: 

Short answer: Learning at least some C++ (and some assembly language too) makes you better at leveraging and, perhaps more importantly, debugging the software platform deep underneath your code. This is true regardless of the programming language or OS you're working in.

Long answer:

One of the differentiating factors, IMHO, between good developers and great developers is that the great ones know what's going on under the hood in a piece of software and are capable of quickly drilling down underneath layers of abstraction in the technology stack, since the toughest software problems are often caused by things way down below your code in the stack.

Therefore, I've always recommended that developers, at some point in their careers, spend at least some time learning two languages which are at the bottom of almost every software stack: C/C++ and x86 assembly language. That doesn't mean you need to become an expert in either, but having a working knowledge of things like pointers, registers, memory management, stacks and heaps, un-GC-ed string buffers, leaks, etc. is hugely useful when you need to reach down into the stack to diagnose a problem, to better understand odd behavior, or simply to make smarter decisions as you architect higher-level software, regardless of the language.

An analogy: I became a much better manual transmission driver once I took apart my motorcycle's engine and saw how the clutch worked. That didn't mean I needed to become a motorcycle mechanic, only that it helped my overall driving skills once what was happening inside my bike was not a mystery anymore.

Also, regardless of the language or framework you're working with, for projects that must call directly down into the underlying platform, C/C++ knowledge is very helpful and sometimes required.

Note that I'm deliberately not touching the more contentious question about whether you should be writing entire apps in C++ or not. Other answers have done a great job covering those arguments. Instead, I'm simply making the case that C++ skills will benefit you, regardless of whether you continue writing most of your code in C# (or Java or Python or Ruby or...)

Justin Grant
Why the downvote? He brings up a very good point. It's important to remember those who don't fully understand the abstractions they use will forever be limited by them. An abstraction is only as good as long as it meets your needs.
Falaina
Best argument I've read so far.
Bob Somers
I agree that by learning low level language, you have better understanding of low level stuff but it doesn't make you great developer for every task.
rjoshi
BTW, I agree with rjoshi. I didn't mean to imply in my answer that low-level skills are all that a great developer needs to know. There's a lot more needed! Being able to understand (and sometimes debug) the platform deep underneath your code may be necessary for programming greatness, but it's not sufficient.
Justin Grant
I like this post, but it really rather side steps the question and simply offers an abstract, albiet true opinion, revise and clearly ANSWER THE OP'S QUESTION and I will upvote.
Firoso
good point. revised to add an explicit answer to the question in addition to my rambling discussion. :-)
Justin Grant
100% agree with this post, I didn't even learn the x86 assembly or anything but instead looked at how the computer ran information in general, and though I can't tell you what exactly is happening, something lingers in the back of my mind that seems to help me while programming :)
DMan
A: 

Personally, I wouldn't go near anything that rude people are regulars of.

ssg
That's because you're a stupid idiot. =D
Frank Farmer
Ouch. I better go and ask this to stackoverflow then, "What advantages can I get from being smarter?". I expect pages and pages of elaboration, because you know, my feelings are hurt.
ssg
ssg - he was just kidding, dont be so sensitive
I__
+7  A: 

I have been C++ developers for last 10 years and last two years, I have been using java for new product development. I have also done some programming on C# just to learn it. Based on my experience I would say C++ is a challenging and high performance language which is good for computer science students to understand programming concept and algorithms. Other usage of C++ would be protocol implementation which doesn't change often E.g implementing SIP Proxy or HTTP Server..

For practice product development where requirements changes often, I would recommend any high level language where developers can focus on application logic instead of reinventing wheel. E.g Recently I started an open source project xcapserver which I was able to do quick prototype in two days using java technologies (Glassfish,REST, log4j, eXist db)but I wanted to lean boost libraries and again it's a protocol which is not expected to change often, so I decided to implement in C++. I spent 4 days just to get the logger working using BOOST::log and another 4 days to fix the thread deadlock issues with Berkeley DB XML.

Another aspect is product maintenance. I have spent days and night to fix memory leaks and corruption and learning curve for new developers is too high versus J2EE or .NET where it's easy to find developers and maintenance is much easier.

In sort, C++ is good programming language which I would recommend to all developers to learn but I don't see much use of it going forward as processors are becoming faster and cheaper so performance is not the reason.

rjoshi
Your logic sounds pretty good. +1
Sergio Tapia
If you had to spent so much time fixing memory leaks, it may be an hint that you need to improve your C++ programming skills. There are a bunch of tricks and habits to keep memory leaks at a minimum. If you use smart pointer classes, allocate and deallocate in constructor/destructor and think a second everytime you do a new. Seldom you will have leaks.
piotr
Thanks for your advice!! The reason I was fixing memory leak/corruption was I have good programming skill in C++ and mastered the fixing memoryleak/corruptions in our product so anytime when problem arise, I would take up the challenge to fix it. It doesn't mean I wrote the code. But it doesn't also mean I don't have to improve my skill :).
rjoshi
There is no official boost logging library. Neither of those libraries were accepted into boost.
rpg
I know boost::log is not an official library, it's one of the two submitted libraries but I think you are missing my point. My point is that just to reuse some existing library took so long and how many developers would have written their custom logging library in C++. In java there are two standard logger e.g either go for log4j or use sun default logger. You don't have to waste time reinventing the wheels.
rjoshi
Usually you don't have to reinvent in C++ either: you have log4cpp (modeled after log4j!) or log4cxx. Although I understand what you mean that having a standard lib is better.
rpg
The single biggest disadvantage of C++ is their utter refusal to add some more of these standard library features. Logging, networking. Christ, it took them 15 years (and counting) to support threading. I understand needing to support many platforms, but maybe it's time to have some differing levels of compliance, like POSIX does. I know reflection is too much to ask for. :-)
Chris Kaminski
+3  A: 

The best reasons for learning C++ for a C# developer is to learn new programming paradigms. C++ is more than just an "object oriented" language and hence offers a chance to learn new approaches to solving problems. With C# 3.0 and .NET 3.5, C++ doesn't affer as many unique paradigms, but if you are not using them, then effective C++ programming will force you to learn them.

In particular, C++ still offers a very powerful generic programming paradigm that is unmatched by C#. The STL forces you to use functional programming concepts that many C# developers avoid or don't use (LINQ extensions and lambda's for example).

I've also found that it strengthens a persons understanding and appreciation for lexical scope. Concepts such as RAII or C++ namespaces really push the need to manage scope very carefully... in C#, many of these concerns exist, but are less "in your face". Template metaprogramming is another unique concept that C++ offers that C# doesn't.

James Schek
+5  A: 

Learn C++ so that you can better appreciate C#.

Pedro Estrada
+1 you sound like someone who has actually had a C++ job.
Steve
Programmed C++ professionally for 5 years before switching to C#. Glad I know it, don't really miss it. Garbage collection is your friend.
Pedro Estrada
+5  A: 

Apart from what others have said:

People do like to see it on resume's.

Learning any language helps you translate that language into C# which makes you more valuable as a programmer.

Learning another language helps you to understand samples using that language, arguably allowing you to draw on a wider range of samples, books, examples, experts.

Wrappers! Learning C++ helps you wrap those pesky C++ dlls for consumption in C#!

That said, there are quite possibly other things you should be learning before C++ if you're a C# programmer who never learned C++ in the first place.

+1  A: 

First off, It sounds like your interested in learning more. That is really the most important part of being a good programmer.

That said; Almost all big open source projects are written in C or C++, if you want to leverage or build on top of those you need to know the language. Not only is working with a large open source project look great on the resume, it also let's you examine some really good (and really bad) code. For me that alone has been a invaluable learning experience.

Jon Clegg
+1  A: 

The primary reason to learn any new or different language is to learn a new and different approaches to solving problems in programming. C# and C++ certainly have some similarities. They also have some pretty substantial differences. At first, those differences will seem (as a few have mentioned) to be primarily with syntax. Further study, however, will reveal considerably greater differences that go well beyond simple syntax.

That means that if you decide to study C++, you need to plan on dedicating a fair amount of time and effort to it before you gain much. If you want something that's radically different from the get-go, you'd probably be better off with something else. My own advice for a completely different language would be Scheme -- basically Lisp with a good housecleaning.

There are lots of other functional languages, and some of them are pretty cool -- but Lisp has outlived a lot of would-be successors, and I think it'll outlive quite a few more. If I were a betting man, I'd bet on Lisp outliving F# by several decades...

Jerry Coffin
+3  A: 

Learn C++ so that you can feel like blowing your brains out.

OwenWiseman
+2  A: 

In order to respect the OP's wishes I won't say anything about how I think C++ can help a C# programmer think differently about code. ;-p

Seriously though, as a tool the main advantage of C++ is that it is multi-platform. Code written in C++ can be run on a huge variety of platforms.

On the other hand the big disadvantage of C++ compared to C# is that it takes a lot longer to write correct code.

While it is possible to write faster code in C++ in theory this assumes an unlimited amount of development time. In practice because I can write more sophisticated code more quickly in C#, I can spend the extra time optimizing the code.

cdiggins
+2  A: 

I speak as a C++ programmer for 15+ years who has spent the last year learning and using C# (and C++/CLI), on top of an ongoing fascination with languages and a broad range of studying other languages to improve my thinking.

I am very very impressed with C# as a language, especially with the improvements in C# 3.0.

I would take the contrary views:

  1. Unless you want employment writing computer games, or relatively low-level components, forget about C++ as a language because there are enough skilled C++ programmers out there and the gaming industry generates a lot more (of presumably varying quality). It is not going to improve your career prospects.
  2. Do invest some time into studying the interesting depths of C#, the implications of operator overloading, how to use unsafe code etc. Pick up a book like the excellent C# in a Nutshell and be able to go through and annotate all the content with deeper explanations of how that idiom might be used.
  3. Learn a dynamic language like Ruby or Python, use it for some real-world tasks such as generating or mangling test files, so you appreciate the simpler language for manipulating files, structures and strings.
  4. Learn F# or another function language and develop a few smirks of your own about the implications of functional languages for parallel processing and clouds :-) In a few years time (or earlier) this will yield huge career benefits when people are scrambling for cloud-savvy programmers. Remember, you haven't learned a new language until you can compare it to the old ones so you need to be able to pontificate about when and where to use F# (or Haskell) instead of C#.
Andy Dent