C# Book Recommendations

BillLeeLee

[H]F Junkie
Joined
Jul 2, 2003
Messages
13,486
Hi all,

I want some recommendations for C# books. Right now I have Jesse Liberty's Programming C#, but it's several years old and covers only .NET 1.1's C# implementation. I would like to update my library and get a book that covers more recent C# material.

Should I stick with buying a newer version of Liberty's book?

Also, what are the really good books about WinForms or just general GUI programming in .NET? I'm about to undertake a brand new project with C#/.NET and would like to update all my C# skills in preparation.

Thanks!
 
As usual, I'll point out that books are a personal preference because everyone has a different style of learning and that's why authors have different styles of writing.

If you like Liberty's book, then it seems sensible to buy the newer version.

The changes between .NET versions come in two ways. One is in the runtime itself (and, I suppose, in the virtual machine it implements). This means some methods change, some new classes exist, different interfaces and features pop up, and so on. I'd figure that you can get this information from MSDN directly. Because MSDN is a reference and not a tutorial or how-to book, the examples and descriptions might not meet your needs.

The other mode of changes are in the languages themselves. Again, you can get information about the langauges from MSDN. MSDN includes the C# language reference.

So, maybe you don't need a book -- or can hang onto Liberty's book and use MSDN to update yourself. Otherwise, some useful books:

I wrote the foreword for Chris Sells' Windows Forms book (ISBN 0321116208). I think there's a newer version of it now. If you've got experience with MFC, this is probably the book to use.

Most of the WinForms books are from publishers like Sams (and so on), who use 35 authors to write 24 chapters and some hobo to do the technical edit. The only other WinForms book that I'd recommend is Petzold's, ISBN 0735621535. It's getting older, too.

Are you doing GUI programming? Then you really want a book on GDI+ instead of a book on WinForms. You'll also want to figure out if you want WinForms or WPF.

If you like standards books, then you'll want to check out the Annotated REference for the CLR. (ISBN 0321194454 is one of the volumes.) The printed languages references that Microsoft sells have all gone out of date, and without explanation haven't been re-issued.

O'Reilly has a C# Cookbook, which offers useful solutions and snippets to scattered different problems. These books are pretty good, if you can learn from inference -- or if you're lucky enough to have the book hit on exactly the problem you're workin'. (ISBN 0596100639)

They also have a C# Nutshell book for 3.0 of the langauge spec. That's ISBN 0596527578. Maybe it's a good steppin' stone between what you have now and MSDN.
 
Thanks for the helpful response mikeblas.

I am looking for a book to supplement what I can get via MSDN. These days I spend a lot more time reading books and testing code where I don't have a net connection, plus I really like reading a deadtree compared to staring at a monitor. I will take a look at each of the books you have mentioned.

As for GUI programming - this is definitely an area where I lack much experience. I have done some MFC programming (in VC++ 6.0), but most of my work has been on the back end, interacting with databases and networking code and such. The closest I have come to doing UI work in the past year has been writing front ends and back ends for wizards for a web application.

The project will be targeted at the .NET 2.0 framework, so I think WPF is out of the question. On that note, I am also very interested in learning about proper GUI programming techniques for Windows and .NET. Such a topic is separating the UI code from the logic code, like whether I should be using the Model-View-Controller pattern, or perhaps there is a better practice for C# development. I use MVC as an example since it's the general pattern employed in Apache Struts and Python django code, both of which I have been using extensively lately.

Again, I am hazy with the GUI side which is why I mentioned WinForms. Now that you have mentioned GDI+ I have more to research.

Thanks mikeblas!
 
Happy to help.

WinForms will let you make, well, forms. You can lay out any of the stock windows controls; buttons, scroll bars, list controls, edit controls, and so on. You can listen to their interaction with users, pump them full of data, and so on.

GDI+ would be if you want to do your own controls (such as a full-blown table editing control) or do something that isn't built in, like charting or simple animation. You draw lines, select colors, draw fonts, handle your own mouse clicks, and so on.

Odds are you want WinForms, and unless you're doing something simple, you want to buy any fancy controls you need in a pre-packaged library.
 
mikeblas - thanks for the explanation of the differences. WinForms does sound more like what I require for this project. It will be a GUI that relies on built in controls, we're not making our own custom UI widgets or anything like that.
 
So then WinForms for sure.

There's a funny thing about WinForms (and Win32 programming, too ... and I think, even Linux control UI programming, too): you can find programming guides about using the controls. How do you put text into an edit control, and how do you figure out which item in a list box is selected? But the funny thing is that there are few books about how to apply the controls. What makes a good UI? When should you use a list box instead of a drop-down combo? And so on.
 
I know what you mean. Believe me, I wasn't very focused on UI design before I started working on products that were targeted at users who you couldn't assume to have any technical skills beyond typing a Word document. You have to put yourself into the mindset of Joe User who will get annoyed at a UI that isn't easy to use after 5 seconds of looking. We have ongoing UI design reviews and debates about how best to present an interface to a user.
 
Back
Top