• 0

Is now a good time to learn C#?


Question

Hi all,

I've been working with C++ for a long time with game development, the only other languages I know are Pascal, Python and PHP. I've just finished a project and have a 3 month gap until the next one so I want to use this time to learn a new language.

I'm thinking about C# because I'm already very familiar with the Visual Studio IDE, and it would also allow me to experiment with ASP.NET MVC and XNA. I had a few questions about it I was hoping people could give their opinions on before I begin:

Primarily, when I played around with C# back in 2001 for a few weeks I wasn't impressed (it seemed slow, lacking functionality, and pretty buggy) is now a good time to learn it? Will most of what I learn in C# 3.5 follow through to C# 4.0 or do they break compatibility between versions? If you're distributing an application to people without .NET installed do you have to get them to install the 250MB .NET 3.5 runtime? Are there any examples of good games/tech demos in XNA (I looked around and haven't really seen any despite many claims it's "just as capable as DirectX")?

Thanks in advance.

Link to comment
Share on other sites

12 answers to this question

Recommended Posts

  • 0

They don't break compatibility between versions, the closest case is in C#2.0 where they "deprecated" a lot of interfaces. Basically, generics should have made it in C#1.0, but they couldn't do it, so they built the .NET librairies around that limitation. With C# 2.0 they published new versions of a lot of librairies which are now recommended above the old ones. Now with implicitely typed variables, LINQ, lambda expressions, generics, and soon dynamic typing support, better COM interop and optional parameters, C# is very slick IMO. There's usually one obvious way of doing something.

I don't think the claims that XNA is "just as capable as DirectX" are exactly true. XNA has been out for a few years and haven't gained much adoption besides hobbyist development. I think most developers don't want to get locked on Windows/Xbox 360 since that's the only ones supported by XNA; also there's a question of floating-point performance on 360 if I'm not mistaken.

One thing XNA does better than any other game SDK is sheer productivity. There are contests held every year where a team of 4 programmers have a few days to make a complete game in XNA, and they do impressive stuff. If a dedicated team can achieve that much in less than a week, imagine what could be done in a year. Of course the difficulties of game design remain mainly intact, but at least the programming is much more straightforward.

As for examples, check out Youtube. There are people who did

,
,
,
and
in XNA. And they're mostly undergraduates which speaks to the power of the framework.

As for .NET, Vista SP1 includes .NET 3.0, and SP2 makes the download of .NET 3.5 shorter. On XP, the user is probably stuck installing the whole framework indeed, but if you target the Client-only framework subset, it's a 28MB download, similar to Java.

Link to comment
Share on other sites

  • 0

To add to Asik's post,

To get to grips with C#, you really should invest some time in understanding .NET's underpinnings, that being the Common Language Runtime (CLR), the Base Class Library (BCL), and the compilers.

One thing that I often get asked about is the difference between .NET 2.0 and 3.0+, and its basically this, they both use the .NET 2.0 CLR, but 3.0/3.5 also bring a newer set of compilers and additional libraries.

Link to comment
Share on other sites

  • 0

Thanks for the replies, sounds good. Do you know of a decent book to get started with? On Amazon these two seem to have the highest rating;

"Apress - Pro C# 2008 and the .NET 3.5 Platform, Fourth Edition"

"Wrox - Professional C# 2008"

Link to comment
Share on other sites

  • 0

I'm a bit skeptical of 1000+ pages books that pretend to cover every aspect of C# and .NET, but I didn't read either. I'd rather get a book on the C# language, then one for the Base Class Library, one for ASP.NET, etc. Right now I'm reading "Programming .NET components" and wow, this is by far the best book I've read on .NET. It's not exactly introductory material though.

Link to comment
Share on other sites

  • 0

Yeah I'm not expecting it to cover everything in detail, just provide a nice overview. I already have "Apress - Pro ASP.NET MVC Framework" because asp.net mvc is the bit I'm mainly interested in - but the book assumes intermediate C# knowledge so I haven't started reading it yet.

I'll pop to the book shop later and check some out, thanks.

Link to comment
Share on other sites

  • 0
Yeah I'm not expecting it to cover everything in detail, just provide a nice overview. I already have "Apress - Pro ASP.NET MVC Framework" because asp.net mvc is the bit I'm mainly interested in - but the book assumes intermediate C# knowledge so I haven't started reading it yet.

I'll pop to the book shop later and check some out, thanks.

If you do, I highly recommend the Wagner books, Effective C# and More Effective C#. You'll gather some lovely nuggets of info from those books. Also, the Essential C# 3.0 book from MS is a good tome. It's a shame that Tom Archer didn't carry on with his Inside C# series. It was easily the best C# book I've read.

Link to comment
Share on other sites

  • 0
Hi all,

I've been working with C++ for a long time with game development, the only other languages I know are Pascal, Python and PHP. I've just finished a project and have a 3 month gap until the next one so I want to use this time to learn a new language.

I'm thinking about C# because I'm already very familiar with the Visual Studio IDE, and it would also allow me to experiment with ASP.NET MVC and XNA. I had a few questions about it I was hoping people could give their opinions on before I begin:

Primarily, when I played around with C# back in 2001 for a few weeks I wasn't impressed (it seemed slow, lacking functionality, and pretty buggy) is now a good time to learn it? Will most of what I learn in C# 3.5 follow through to C# 4.0 or do they break compatibility between versions? If you're distributing an application to people without .NET installed do you have to get them to install the 250MB .NET 3.5 runtime? Are there any examples of good games/tech demos in XNA (I looked around and haven't really seen any despite many claims it's "just as capable as DirectX")?

Thanks in advance.

Any time is a good time I would think. The book I used was Microsoft Visual C# Step By Step. It includes a cd with source code projects and even though they say use Visual Studio, Visual Studio Express C# and SQL Server Express can be used and are free! http://www.microsoft.com/express/

You can get it here: http://www.amazon.com/Microsoft-Visual-C-2...p/dp/0735624305 or not... :shifty:

Link to comment
Share on other sites

  • 0
Are there any examples of good games/tech demos in XNA (I looked around and haven't really seen any despite many claims it's "just as capable as DirectX")?

If you're doing this to get into game development, besides C++ and Python, learn Lua, and scripting with the Unreal engine. That's what most game dev coding jobs ask for these days. The Unreal engine is the most popular engine right now, and it doesn't look like anything else is going to replace it soon. Games that use Lua include WoW, Warhammer, Bioware's RPGs, STALKER, and Crysis. I am not sure what the Japanese like to use for their console games, it's either proprietary or Python or Lua, it's definitely not C# or XNA. Java would also be useful if you want to work on cell phone and portable games. There's a lot of non-game jobs for AJAX devs now too.

Link to comment
Share on other sites

  • 0
Any time is a good time I would think. The book I used was Microsoft Visual C# Step By Step. It includes a cd with source code projects and even though they say use Visual Studio, Visual Studio Express C# and SQL Server Express can be used and are free! http://www.microsoft.com/express/

Thanks, I'll take a look at that book when I'm out too.

If you're doing this to get into game development, besides C++ and Python, learn Lua, and scripting with the Unreal engine. That's what most game dev coding jobs ask for these days. The Unreal engine is the most popular engine right now, and it doesn't look like anything else is going to replace it soon. Games that use Lua include WoW, Warhammer, Bioware's RPGs, STALKER, and Crysis.

Forgot to mention I've already used UnrealScript extensively in the last project. I've never worked on a project involving Lua (and I know my next one doesn't require it) but it still may be useful/interesting to learn so I may look at that over the next few months too, thanks. I'm already in game development so C#/XNA would be purely for personal projects.

Link to comment
Share on other sites

  • 0
Thanks, I'll take a look at that book when I'm out too.

Forgot to mention I've already used UnrealScript extensively in the last project. I've never worked on a project involving Lua (and I know my next one doesn't require it) but it still may be useful/interesting to learn so I may look at that over the next few months too, thanks. I'm already in game development so C#/XNA would be purely for personal projects.

http://creators.xna.com/en-US/education/

https://www.dreamspark.com/Products/ProductList.aspx

Link to comment
Share on other sites

  • 0

I have the Apress book and like it a lot. I also have "Programming C#" from O'Reilly. It's a good one too.

As far as the language goes, C# is fantastic. There are a lot of little things that were incredibly irritating to me when I was first switching from C++ (no automatic casts from int to uint or back? WTF?). But once I got past my C++ bias and just accepted C# for what it is, it became a pleasure to work with. Funny enough, I now find C++ very irritating to work with.

The .NET framework is amazing, it seems like they have classes for everything. Except for computing CRCs or performing validity checks on SSL certificates. :) It's quite overwhelming at first, but like anything else once you get used to the library the classes become second nature.

I can't comment on XNA since my knowledge of modern graphics programming < my knowledge of the feeding habits of the dwarf ostrich.

Good luck!

Link to comment
Share on other sites

  • 0
But once I got past my C++ bias and just accepted C# for what it is, it became a pleasure to work with. Funny enough, I now find C++ very irritating to work with.

I know exactly what you mean. For Windows forms applications, C# is definately the way to go... For command-line based stuff, though, unless I need a specific .NET feature, I still prefer C++.

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.