After a few years writing good ol' straight, archaic, homely C/C++, I'm finally going to give in and learn .NET. I'm looking for the best way to become .NET-competent quickly.

I use VS2005 C/C++ Express and I see there's a CLR choice in the "new project" wizard. I think that must be a way into the world of managed code. Is that a reasonable entry to .NET?

Do I have to learn C# or some crazy stuff instead? Or maybe [shudder] CLR is just the first baby step into .NET?


My comment above sounds snarky (and it is, frankly), but the intention behind it might be missed because of that same snark. Instead, I'll post an answer that more accurately states what I mean.

If you're not enthused about the language you're about to learn (and it doesn't sound like you are enthused about .Net at all) then my advice is: "Don't." You should be looking forward to this new learning with at least a sense of "I wonder if ..." rather than "You mean I have to ... what?".

Unless you have some employment commitment that requires it or a free boot camp coming up or something, you may want to skip it for now. Try a different language with an entirely different tool-set, syntax, direction. These other languages may give you a fresh perspective on the language you're not excited about and reinvigorate you to learn it. You may just come to like one of the more, or find more job opportunities with one.

Moral of the story: If you're not in love with the direction your learning is going, pick another direction out of the air and try it.

| improve this answer | |
  • 2
    +1 For the 2nd paragraph! The benefits of learning Python on Ruby to (apart from them being great languages) is that they are both integrated on the .Net platform. So you could learn .Net and Python/Ruby at the same time. – Jetti May 2 '11 at 14:33
  • @Jetti, that's a great idea. I'll take it. Thanks. – Pete Wilson May 2 '11 at 20:10

That would be one way to do it, but I'd not recommend it. The syntax is similar, but the way you do things is sometimes different. Trying to figure it out without any help could get frustrating. Get a book like Pro C# (this is a link to the .NET 4.0 editition, I only have the .NET 3.5 edition but it was very good, and I would hope the quality has stayed the same in this newer edition) to work from. It's not a beginner's book but you sound like you can easily handle it. There're also probably many good tutorials online if you don't want to drop cash for a book, but I don't have any great links to recommend for getting started (only for very specific topics).

Also, I'd look into getting VS2010 Express Edition for C#, VS2005 is a bit outdated now. Only thing is, I don't know how well two different versions of VS EE will play on the same machine...

| improve this answer | |
  • 1
    +1: That whole series of .Net books by APress is very good. – Joel Etherton May 2 '11 at 14:03
  • Yes, I'm worried about the coexistence of two VSEE editions, too. Thanks for your helpful answer. – Pete Wilson May 2 '11 at 19:35
  • @Pete Wilson: Do you need VS2005 C++ EE or is upgrading to 2010 an option? I think that two installations of VS EE that are the same year-version but different "flavours" shouldn't have much trouble, but I haven't tried that myself in a long time. – FrustratedWithFormsDesigner May 2 '11 at 19:37
  • Yes, I could upgrade to VS2010 except that I have this huge nearly-done C++ project under 2005 that I'm terrified of breaking, so I'd just as soon not introduce another variable right now. That's the only reason I'm putting off an upgrade. – Pete Wilson May 2 '11 at 20:06

I would not recommend you first venture into .NET by way of C++/CLI. It's a language that gives you careful and fine-grained control over -- well, some stuff you don't understand yet. Start with C# instead, because it's simpler. C# Express is free and you will mostly know how to work it from your experience with C++ Express.

As for how to learn, there are some pretty good Getting Started links on the Start Page inside Visual Studio itself. Make an app that does something you already know how to do in C++, like opening and parsing a file, or gathering info from controls on a form and then saving it somewhere. Then you can start to try new things according to what you're trying to write.

Once you're comfortable with the CLR and with C#, you can come back to C++/CLI as a way to control interop to your old code, should you feel the need.

| improve this answer | |

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