What are the recommended books and sites for learning C# so I can then make a game using XNA?

XNA has made game development easy, but to use the XNA framework you still have to be able to develop with C#. You don't have to be an expert, but you do need to understand the basics of Object Oriented development and the general syntax for the C# language.

That's great for those of us who are already developers, but there are a lot of people interested in XNA, that are not already developers (and some of them are developers who just haven't given C# a try yet). Every time a new game developer hopeful comes into the forums frustrated because they don't understand the code or where to start, we give them a generic answer about taking some development classes, find some books on C#, check out some C# tutorial sites or point them towards TorqueX.

Well, I wanted to start this thread so we could have a more specific reference to point them to for any recommended books and/or sites for learning C#. So if you have a site you've used yourself or a book you found helpful when you were learning C# mention it here.

Hopefully this thread will become a great resource for new XNA game developers who need to start at the very beginning. So with that in mind, try your best just to keep posts to this thread purely for links and recommended books for C# development.

Recommended Link for VB.NET developers who need to learn C#:
To start off, here is the one link that I can recommend personally. This link is primarily for those VB.NET developers who just haven't taken the plunge and finally increased their skillset by learning C#. I was one of those developers for the longest time and did all of my Managed DirectX coding with VB.NET. With XNA I finally decided I was being silly constantly converting tutorials and sample code to VB and just joined the rest of the community by using C#. This site was an invaluable resource to me for learning and refreshing my memory on the syntax differences between the two languages.

VB.NET to C# language comparisons

They also have a page for Java and C# comparisons, so that may be useful for someone coming from Java as well.

[2348 byte] By [GeorgeClingerman] at [2007-12-27]
# 1

Great idea, George.

The C# book I found with the best reviews on Amazon.com was Jesse Liberty's Programming C#. I checked it out of the library, but have been too busy to take a look at it. It does say that it requires some previous C++, Java or Visual Basic experience, but I don't think it will be overly complex for a new programmer to follow. Based on the reviews, a lot of people with C++ experience find the book too basic and would rather have delved into a .NET book instead. Just food for thought...

Topics covered:

  • Introduction to C# and the .NET platform

  • A "Hello World" example in C#

  • Tutorial to C# as an object-oriented programming language (types and variables, operators, namespaces, and preprocessor directives)

  • Defining classes in C# (including static members, finalizers, overloading, and read-only fields)

  • Inheritance and polymorphism implemented in C#

  • Operator overloading

  • Structures in C#, interfaces, arrays, and indexers

  • Built-in .NET collections, strings, and regular expression support

  • Structured exception handling

  • Delegate and events

  • Introduction to programming with Windows Forms

  • ADO.NET database APIs (including basic XML support)

  • Quick introduction to Web Forms and ASP.NET used with C#

  • Introduction to Web services (SOAP, WSDL, and Discover services described)

  • In-depth guide to .NET assemblies (including metadata, versioning, private and shared assemblies)

  • C# support for attributes and reflection (including reflection emit techniques)

  • Marshaling and remoting (with and without SOAP)

  • Threads and synchronization

  • Tutorial to C#/.NET streams (including basic I/O techniques, Web streams, and serialization)

  • COM and .NET interoperability
XNARockstar at 2007-9-4 > top of Msdn Tech,Game Technologies: DirectX, XNA, XACT, etc.,XNA Game Studio Express...
# 2
I usually recommend these three books to colleagues when they are thinking of learning C#. I recommend them for people who already have some programming skills. There is some crossover between the three books but anyone who reads all three should have a strong knowledge of the C# language and the .Net Runtime, and they are all well written and easy to read.

Essential .Net Volume 1

CLR Via C#: Applied .NET Framework 2.0 Programming

Effective C#: 50 Specific Ways to Improve Your C#

Cheers,
Leaf.

Leaf. at 2007-9-4 > top of Msdn Tech,Game Technologies: DirectX, XNA, XACT, etc.,XNA Game Studio Express...
# 3
I've put the same question out on my blog trying to garner some more responses. Here are two more suggestions from some other helpful coders.

This was suggested by Tim Hibbard, he's a previous VB developer who just recently started teaching himself C# and famous for his work with "Where's Tim?" a social geocoding project. He says this site is a must for helping learn how to convert your VB to C#.

Converting VB.NET to C#

And these two books were suggested by the ever so stylish Justice Gray.

Clr Via C#, Jeffrey Richter (I see that Leaf also recommends this book, so it must be a good one to have so many developers mentioning it)

Professional C# by Wrox

I'll continue to post anymore I get from any suggestions I get.

GeorgeClingerman at 2007-9-4 > top of Msdn Tech,Game Technologies: DirectX, XNA, XACT, etc.,XNA Game Studio Express...
# 4
Ok, here's another C# learning resource to add to the list. I didn't get this as a recommendation from anyone, but I've been doing some searching for new C# learning materials and I stumbled across a video series produced by Microsoft. I checked out a few of these learning resource videos and they're really a great for someone just getting into developing with C# and start with the basics.

Microsoft's Visual C# Express Edition Video Series

I think the "

Absolute Beginner’s Video Series" is going to be a great resource for new guys. Especially since video tutorials seem to be the "it" thing right now.

I'll keep posting new resources as I find them.

GeorgeClingerman at 2007-9-4 > top of Msdn Tech,Game Technologies: DirectX, XNA, XACT, etc.,XNA Game Studio Express...
# 5
I'll second the recommendation about the Video Series for "Absolute Beginners." I'm not quite an "absolute" beginner, but I still found Bob Tabor's series of 16-odd videos very very helpful. Much clearer than trying to make sense of the documentation.
Grotius at 2007-9-4 > top of Msdn Tech,Game Technologies: DirectX, XNA, XACT, etc.,XNA Game Studio Express...
# 6

I was going through my normal sites this evening and found a link to a free ebook that covers an introduction to C#. (http://www.programmersheaven.com/2/CSharpBook), I thought that with all of the new guys jumping into C# and XNA that this book might come in handy.

GlennWilson at 2007-9-4 > top of Msdn Tech,Game Technologies: DirectX, XNA, XACT, etc.,XNA Game Studio Express...
# 7

It depends a bit where you are coming from.

If you are starting from scratch, with no prior programming knowledge:

Ron Penton - Beginning C# Game Programming.

People either seem to love or hate Penton. There are some factual errors, but if you just read through it to get an overview, it serves as a clear introduction to C#. (2004)

Donis Marshall - Programming Microsoft Visual C# 2005: The Language.

Marshall is great as both an introduction and reference material. If you only want to spend a little, get this one rather than Penton, otherwise get both. (2006)

If you are slightly more advanced, perhaps coming from another language:

Jesse Liberty, Brian MacDonald - Learning C# 2005: Get Started with C# 2.0 and .NET Programming.

Liberty and MacDonald is great if you have some background in object oriented programming. Just make sure to get the second edition, not the first one. (2006)

Jesse Liberty - Programming C#.

Liberty moreor less copied and condensed the above book as the first half of Programming C#. Some seem to think it got less clear in the process. However, the second half is new material, and worth the read. (2005)

Maybe not beginner books, but good to have to look stuff up:

Jay Hilyard, Stephen Teilhet - C# Cookbook.

Hilyard and Teilhet really is a cookbock. There are 70 small solutions to common programming tasks, such as converting an array to a delimited string. Get the second edition. (2006)

John Sharp - Microsoft Visual C# 2005 Step by Step.

Sharp is very good too, but only as your second book, once you get the basics. (2005)

Andrew Troelsen - Pro C# 2005 and the .NET 2.0 Platform.

Troelsen gets basically as many recommendations as Sharp, and is also a 'second level' book. But do get the third edition. (2005)

Two old books which still stand as good introductions to game programming, even though they are hardly written for XNA are:

Tom Miller - Managed DirectX 9 Kick Start.

Miller is clear and Concise. Read it. (2003)

Daniel Sanchez-Crespo Dalmau - Core Techniques and Algorithms in Game Programming.

Dalmau provides an overview of game programming design for beginners. A fun read. (2003)

JoranOmark at 2007-9-4 > top of Msdn Tech,Game Technologies: DirectX, XNA, XACT, etc.,XNA Game Studio Express...
# 8
try tod millers beginning 3d proggraming it uses c# and it instructs you on making games you even get to make a game with online capabilities great book and i think it was $55 it comes with almost everything you need to start except for the IDE wich in the book uses microsoft visual studio 2003 but i used micorsoft visual c# and it worked fine
swaynny at 2007-9-4 > top of Msdn Tech,Game Technologies: DirectX, XNA, XACT, etc.,XNA Game Studio Express...
# 9
http://xnatutorial.com/

Joran Omark has a bunch of video tutorials which I feel are a fantastic intro to oop, C# and XNA - I'm a C# web developer (real short background in C/C++) and for me, the videos are a little slower paced, but I feel would be fantastic for a beginner.

Even though I know almost everything in the videos so far (just getting into XNA now on em) - I still find him enjoyable to listen to and the tutorials, theories and vocabulary are refreshing and a pleasure to watch.

satiated at 2007-9-4 > top of Msdn Tech,Game Technologies: DirectX, XNA, XACT, etc.,XNA Game Studio Express...
# 10

I found Tom Millers book was a great start to MDX.

For C# I found the MSDN docs an invaluable resource, I started out with C# not long after it was publicly released so I guess I got in there early, however everything I have learned has been from MSDN docs.

The only books I do invest in are patterns books, understanding patterns and having a strong understanding of OOP can go a long way.

Design patterns in C# by Steven John Metsker is a great book to start with.
Patterns of Enterprise Architecture by Martin Fowler may be useful however it is geared toward what it says, enterprise apps, still its a great book for design patterns.

There was also a generics book (I think on wrox) that looks very good, I was meaning to get this at some point although I am not sure if it will tell me any more than the MSDN docs do.

Fluxtah at 2007-9-4 > top of Msdn Tech,Game Technologies: DirectX, XNA, XACT, etc.,XNA Game Studio Express...
# 11
I'm finding this thread very helpful, just wish I found it a few months ago.
I've come into this with no programming experience (been a hardware guy for 15 years).
Started looking for books on C# and it took for ever to find out where to start.

I started with John Sharp's C# Step by Step
Didn't find it too hard in fact i thought it was a great primer for understanding the language and what everything does.

Currently I'm reading 3D math primer for graphics and game development this seems perfect after i read Sharp i knew i had to brush back up on my math but didn't know which. I think most programmers tend to forget that many people interested in XNA may not have math background. So i think this book is perfect for everyone who not sure.

I'm also gonna give Beginning C# game programming a once over.

And from looking at this thread I have a few others I'm planning on reading too.

Sicundercover at 2007-9-4 > top of Msdn Tech,Game Technologies: DirectX, XNA, XACT, etc.,XNA Game Studio Express...