Welcome to the Slashdot Beta site -- learn more here. Use the link in the footer or click here to return to the Classic version of Slashdot.

Thank you!

Before you choose to head back to the Classic look of the site, we'd appreciate it if you share your thoughts on the Beta; your feedback is what drives our ongoing development.

Beta is different and we value you taking the time to try it out. Please take a look at the changes we've made in Beta and  learn more about it. Thanks for reading, and for making the site better!

C# Book Recommendations?

Cliff posted more than 7 years ago | from the which-one-is-the-best-to-learn-from dept.

Programming 116

Stevecrox asks: "I'm in my final year of university and have a working knowledge of C/C++, Visual Basic, VHDL and a variety of Assembler languages, however chatting to a friend on his placement year I've been told that C# is what employers are really looking for. What book would you recommend to someone looking to learn C# with my experience?"

Sorry! There are no comments related to the filter you selected.

Book? (2, Insightful)

TodMinuit (1026042) | more than 7 years ago | (#18371997)

Just start screwing around. Build some stuff in it. Work on some open source stuff. You should be able to pick it up easily.

Re:Book? (2, Insightful)

WebCrapper (667046) | more than 7 years ago | (#18372067)

Well, that doesn't work on people like me that work MUCH better if they're programming something for a reason. While I hate to admit it, I don't have the personality of "I'm going to do this just for the hell of it" - I need a reason to make my life easier, etc.

While I'm not the story parent, I've recently found projects to work on in C# so I can learn...

Re:Book? (4, Interesting)

Osty (16825) | more than 7 years ago | (#18372277)

Well, that doesn't work on people like me that work MUCH better if they're programming something for a reason. While I hate to admit it, I don't have the personality of "I'm going to do this just for the hell of it" - I need a reason to make my life easier, etc

Reading a book wouuldn't help in your case either. My suggestion? Every computer science student at one point or another has had the desire to build a game. Go download Visual C# Express [] and XNA Game Studio Express [] for free and learn C# while scratching that itch at the same time. While the XNA bits won't necessarily be directly applicable to getting a job outside of game development, you can use the full .NET framework for Windows games (XNA on Xbox 360 uses a more limited version of the Compact .NET Framework). Could there be a more fun way to learn C# than by building a game?

Re:Book? (3, Interesting)

cyclop (780354) | more than 7 years ago | (#18372773)

I personally don't like computer games that much (expect perhaps for Civilization-like things), and I always found programming games, when I tried, unbelievably boring. However, YMMV.

Re:Book? (1)

WebCrapper (667046) | more than 7 years ago | (#18373143)

I read programming books all the time. In fact, I take an odd pride in being able to sit down and read a programming manual without falling asleep, but reading isn't actually programming.

The funny part about what you wrote is: I'm actually sitting in front of a freshly installed (ie: within the last hour) copy of Visual Studio Pro. Now, granted, I'm working with ASP.NET but I'll still be able to move into C#...

Re:Book? (3, Insightful)

CastrTroy (595695) | more than 7 years ago | (#18373613)

Everybody wants to build a games. Nobody ever does. Building a game takes a lot of time, and really isn't much more interesting than programming any other application. Plus it takes a lot of time before you get something useful. Plus, there's a lot of other skills required. You probably have to do the art, textures, character models (3D or sprites), level design, and the list goes on. Making an application that fits some need you have would probably make a lot better use of your time.

Re:Book? (0)

Anonymous Coward | more than 7 years ago | (#18382783)

No offense, but you don't have what it takes. You'd make a great accountant though.

Even if he wants books (0, Troll)

Nik13 (837926) | more than 7 years ago | (#18372381)

Even if he actually wants books, I don't see why he even needs to ask here. You have *NO* idea how many times I've answered this question before. On various forums, on newsgroups and what not. I could do a lengthy writeup about which books and why, or copy/paste a canned answer every time, but I've essentially tired of answering it over and over again. It's like the old "what distro should I use?" question.

Go to, and search for "C# book recommendations" and variants - I've answered it there like a dozen times at least -- there's currently 1310 hits for that expression! The information is out there, easy to search. No point in answering it over and over again. Try the same on some programming forums. Some programming community sites have relevant stuff too. Check amazon's best sellers in that category. You can probably borrow some (from friends or a public library) and also check the books at your local book store.

Besides, which books *you* really want might be different than the ones I want. There's books on every aspect of programming in anything .NET-related (the languages, the framework, the CLR, ADO.NET, ASP.NET, etc). It depends which parts you want to learn about most. Some books are for total beginners, others are targeted at experienced developers. And most people tend to prefer some publishers over another, so it's a bit of a personal choice too.

BTW, there are some free training videos at MSDN. Some other companies have a few too, or reasonably priced ones (e.g. The MSDN library here [] (1940MB download). Lots of sample code. Starter kits. The MSDN and architecture mags. The .NET SDK. Various fun places like coding4fun (why not have some fun while you're learning?) MS eLearning often has some free courses. There's tons of webcasts. I've seen some pretty good offers too (like watch 3 webcasts, and receive a copy of VS 2005 Standard for free). Tons of community sites like There's just too many resources out there to list (and hyperlink) them all here, so I'm working on a site that lists such resources.

Re:Even if he wants books (1)

Stevecrox (962208) | more than 7 years ago | (#18372899)

I asked here because this is a place filled with people who use C#, I was hoping one or two authors/books would be repeated and they have in this thread. There are tonnes of books out there rated excellent so it becomes hard to tell which ones are really good. When I'm a poor student buying a £60 book blindly (my local waterstones doesn't have any C# books) is a bad idea

Why do I ask for a book? I've found having a book as a reference is a great way to learn, when I was first messing around with Visual C++ looking though a book helps me understand everything I am doing. I learnt C just by screwing around with some code and learning how to control a robot arm. I didn't understand C until I attempted a pure C++ project and began learning which commands were C++, which were C and what the difference between them actually was.

As for the MSDN well I have a copy of VS 6/ using the MSDN help file in any of those usually means I want to punch my PC. I don't get on at all with it, I'm sure its a valuable resource and great for 99% of people out there but not for me.

Re:Even if he wants books (0)

Anonymous Coward | more than 7 years ago | (#18373411)

I don't use MS crap, but here's what I do when I want to buy a book on a topic:

First, search Amazon. Look for books with a lot of reviewers and a high average review. If possible, read the sample chapters, and look through the table of contents. Make a list of a few that look good.

After you've got a few ideas on what you might want to buy, search the web for those titles, and see what other people are saying about them and look for online errata pages and stuff like that. Like you said, you'll probably notice a few books being mentioned positively more than all the others, so those are good candidates. Use the results to further cut down your list.

After that, find the books in book stores, and skim through them. Read a few paragraphs here and there, and make sure it's written in a style you like. I'm not sure how you would do this if the local book stores don't have the books you want, though.

After that, buy a book.

Re:Even if he wants books (2, Informative)

plover (150551) | more than 7 years ago | (#18374501)

Something I've found useful is to learn which publishers to trust. The editors at each publishing house each have their own eye as to what they think makes a good book. Some lean more towards the scholarly, some to the "reference style", while others take a more colloquial approach. And some just publish whatever crap gets submitted.

After you've read a few, you'll start to get a feel for the kinds of books you like. You'll probably also get the taste of a few lemons. But you'll eventually find that a few publishers seem to hire authors that present the kind of information you learn best from, and you'll end up going back to them repeatedly.

Looking around my cube, I just surprised myself by learning that I have more Addison-Wesley titles than books by all other publishers combined. I have some really good titles by Apress and O'Reilly, and the rest are scattered across other publishers. And I've never cared for the "Dummies" series or the style of writing they seek out. Not that the smaller publishers don't produce good and useful books, it's just that I've found a consistently high level of quality in A-W books, which is why I've bought so many. As a plus, their bindings have proven quite durable even with the crap treatment some of my books take. (I've also learned that I could probably stand to weed out some of these really old titles, like "Programming the 8086/8088" :-)

I realize I'm not answering your direct question, but I'm saying that if you have some books that have helped you well in the past, try looking at other titles by the same publisher.

Disclaimer: I have no relationship to Addison-Wesley other than as a very satisfied customer. And I really like Apress and O'Reilly, too.

Re:Even if he wants books (1)

frank_adrian314159 (469671) | more than 7 years ago | (#18378805)

I just surprised myself by learning that I have more Addison-Wesley titles than books by all other publishers combined.

Addison-Wesley publishes much more in the Computer field than AP. And, although O'Reilly publishes about as many titles, it's not clear that the result is much better than the online resources whose transcriptions make up a large part of their content. AW is *the* class act in CS publishing for the US, covering both academic and trade areas. They have the best editors, content production, and physical production around. Face it, if Knuth lets them publish his stuff, they must be good...

Re:Even if he wants books (1)

Bovarchist (782773) | more than 7 years ago | (#18375561)

I've heard good feedback on books by Amit Kalani (sp?). He's written a few of the non-MS Press exam prep books. Even though they are exam preps, they still have loads of good information that can help you learn, and they are a better reference than MSDN. Whatever you do, stay away from the .NET 2.0 Foundation book from MS Press. I used it to study for the 70-536 exam and while it contained lots of important information, there were LOADS of errors both in the text and the example code.

Re:Book? (4, Interesting)

teslar (706653) | more than 7 years ago | (#18372869)

I disagree. To learn a language you have to know what its strengths and weaknesses are, which approaches work well, which don't. You could get that knowledge from just playing around, but it'd be a lot quicker if you read a book that tells you. Especially if you know another language, a list of the crucial differences is very much required. If not you end up writing things in the style of one language that really should be expressed differently.

Example: C programmer in Matlab. Task: Take two vectors of same length, for every i smaller than length, multiply the ith element of the first with the ith element of the second vector.


Just playing around, as you suggest:
function y = multiply_vectors(a, b)
      y = zeros(size(a));
      for i = 1:length(a)
            y(i) = a(i)*b(i);

Doing it the proper (Matlab) way:
y = a.*b;

It's a simple and therefore unlikely example, granted, but there are many such differences between programming languages. Just playing around doesn't easily allow to find them because, technically, the code works. It just doesn't work efficiently. That said, once you know how to deal with the language, by all means, screw around. A lot.

Re:Book? (2, Insightful)

CastrTroy (595695) | more than 7 years ago | (#18373693)

Case in point. I learned C in first year university. In second year, we took a file structures course that required use to use C++. I had never used C++. But I did know C. So instead of using strings.h, I used characters arrays. Sure you can do all the same things, but one requires much more work than the other. There's easy ways to do things, and hard ways to do things. If you read a book, you can often find the easy ways to do things, that would be very difficult in another language.

Re:Book? (2, Insightful)

CastrTroy (595695) | more than 7 years ago | (#18373585)

Languages aren't that hard to pick up, it's the API that's important. And you really can't learn an API from a book, you just have to use it. Not only that, C# (.Net more specifically) has a great API reference. There's no reason to buy a book at all. If you understand C++, then you shouldn't have any problems using the same concepts in C#. I never understood employers who required that you have 10 years experience with a certain language. You can learn the Language in 1 week. If you've been working with VB.Net for 3 years, there's no reason that you shouldn't be able to do similar stuff in C# after a week of getting used to the differences in syntax.

Re:Book? (1)

geoffspear (692508) | more than 7 years ago | (#18374741)

The people in Human Resources see that you want a C# programmer at a certain high salary, and decide that the job requires someone who's been using C# for 10 years. I always wonder how many jobs with requirements like this go unfilled because the idiots weeding out "unqualified" resumes don't realize that C# hasn't even existed for 10 years.

Use of C# as a better VB... (1)

phunctor (964194) | more than 7 years ago | (#18375865)

Sure, why not. In fact I encourage all my competitors to do just that!

In the meantime I'll continue with the old-fashioned paradigm based on skillful use of non-proprietary language features.

class raii{
raii(){}; // resource allocation is initialization
method(){} // code missing whole categories of bugs
~raii(){} // release resources here and profit!

This seems to be so much harder than garbage^ collection...


Re:Use of C# as a better VB... (1)

Ravatar (891374) | more than 7 years ago | (#18378423)

I don't recall the argument that GC is "easier" than manual memory management, only more efficient (as far as CPU time is concerned) and faster/less error prone to develop with.

Re:Use of C# as a better VB... (1)

Raenex (947668) | more than 7 years ago | (#18383803)

"faster/less error prone" IS easier.

A few (4, Informative)

Anonymous Coward | more than 7 years ago | (#18372035)

Professional c# 2005 and the .net 2.0 platform by apress is excellent. Read it from cover to cover (about 1000 pages but very high quality book). It will cover the basics of C#. Also it exposes you to database access with c#, and covers both data readers and datasets from .net library. It also covers winforms and gdi+ programming. It gives you a taste of 2.0 also. If you buy 1 book, buy this one. I bought it and just lucked out. I spoke with several other people and this is the one book everyone seems to recommend.

Next up i'd look into beginning 2.0 with c# by wrox press if you are interested in web development. It is an example driven book. You read a little, then it walks you through doing something. It also has assignments at the end of the chapter to make sure you are getting it.

Continue with pro 2.0 with c# 2005 by apress. It will give you a deeper look into more advanced topics of

Re:A few (1)

DeafByBeheading (881815) | more than 7 years ago | (#18372095)

Seconded. It also discusses how many C# features are implemented in CLR, giving you a healthy dose of background.

APress is my new fave (1)

WED Fan (911325) | more than 7 years ago | (#18374155)

APress has quickly become my new favorite. On my vast bookshelf at work, you can kind of chart the publishers:

  • Osbourne - for a lot of older stuff that we aren't using anymore. The books are all over 5 years old
  • Sams - for the quick and dirty, someone-handed-me-a-project-in-X and I have to know something about it (10 minute, 24 hours, 21 day guides)
  • Rational - Odd stuff, never liked their style
  • APress - for all the current stuff. The books are fast, laid out well, they seem to curry writers and experts in the field, such as Hillier for SharePoint and Office and Myers for WF. I have APress for my JavaScript, SharePoint, XML, SQL, .NET (VB,C#,ASP.NET)
  • Wrox - The one stand out, and I have one book by them. It's a SQL Analysis Server for MDX book. Why? Because I haven't found one that covers the topic from APress

Re:A few (2, Interesting)

Doctor Memory (6336) | more than 7 years ago | (#18376045)

i'd look into beginning 2.0 with c# by wrox press
Since the question was about C#, why not mention that there's a corresponding Beginning Visual C# 2005? I found it to be very helpful, unlike the other C# book I bought (Core C# and .NET from Prentice-Hall). It starts off with C# itself, and only after covering that thoroughly does it get into Windows-specific topics (ignoring the fact that C# itself is largely Windows-specific).

On a meta-note, be sure to check out what employers in your area (or the area where you'd like to live) are actually looking for. Here in the Midwest, it's largely C#/.NET, but on the coasts there was a lot more Java work. Java also seems to be more prevalent in companies that have large systems, whereas .NET dominates in the small-to-medium size business market. Think about where you want to live and what kind of company you want to work for. I'm sure you can find work no matter where you go, but speaking as a Java developer in the heartland — well, there's a reason I have these "Learning C#" books on my shelf... :/

Re:A few (1)

Johnboi Waltune (462501) | more than 7 years ago | (#18379393)

The "companion" APress book to Professional C# 2005 is "Visual C# 2005 Recipes". It's just a couple hundred of examples of how to accomplish commonly encountered programming tasks using C# and .NET.

I got my company to buy me a copy, but it's worth the 60 bucks, if you're new to C#, and you find yourself in a situation where the boss is breathing down your neck and you just need to "get it done". (Or maybe you exaggerated your C# skills on your resume to get a job.) It's a timesaver to reach for this book rather than scour Google for hours and find examples that may or may not work, and are sometimes not explained or only partially so.

A programmer's introduction to C# (4, Informative)

martijn-s (456925) | more than 7 years ago | (#18372051)

I got this book around when C# was first introduced. I started from the same languages you name, and I've quite possibly never read a better book about a programming language (and API of course). 4 []

(Actually, A programmer's introduction to PHP is also very good.)

Re:A programmer's introduction to C# (3, Insightful)

xtracto (837672) | more than 7 years ago | (#18373159)

I recommend Deitel's C# book. It is a very comprehensive book and has everything you can need.

I will also recommend the In a Nutshell [] book. I am a big fan of those books as they cut all the crap and take you directly to the meat (I loved specially the SQL IAN book).

And for all the people saying "dont buy a book", STFU. If you do can not answer the question of the poster just do not post anything. His question is not "Should I buy a book?" but "Which book to buy". If there is something I have learned is that reading a book is *never* a bad idea. Or what, if someone asks you in the street how to get to X you answer "No, dont go to X, go to Y, X sucks" ?.


Re:A programmer's introduction to C# (0)

Anonymous Coward | more than 7 years ago | (#18374687)

Sorry dude, naive users need to learn what to avoid I never realized how bad Steve Oualline's first edition of Practical C++ until I read other C++ books. Starting with the wrong book can ruin a potential developer.

Don't get the Nutshell one (3, Funny)

Erioll (229536) | more than 7 years ago | (#18375127)

I've read a few of the "in a Nutshell" books, and the C# one is by FAR the worst. Most of the others are anywhere from good to great (the Java one is outstanding IMO), but the C# one just falls really REALLY flat. The examples are bad, and he often jumps in "assuming" that you know how things are supposed to work. But most glaringly, it doesn't even cover the most common operations. Like take a guess how to bring in an entire text file at once? Guess what: you basically need to go into the API and figure it out yourself, because none of the string or file I/O examples touch on it at all. Now true, I haven't seen it since first edition, but I wouldn't trust it at all. I'm just glad I didn't lay money out for it, but rather got it from a library.

The authors of the "nutshell" books are not all the same, hence the vast differences in quality. Buyer beware!

Re:Don't get the Nutshell one (1)

jmccay (70985) | more than 7 years ago | (#18384749)

I have always taken the nutshell books more as a reference than a learning tool. I use the C++ one for a reference from time to time. If you want a book to learn with, don't buy a nutshell book. If you want a book for reference, check out the nutshell books.

MSDN (2, Informative)

jfclavette (961511) | more than 7 years ago | (#18372053)

If you are familiar with object-oriented programming, then I dont believe you need a book. MSDN C# language page [] should be all you need. If you insist on getting a book, I recommend Programming C# by Jessy Liberty for a tutorial.

Re:MSDN (0)

Anonymous Coward | more than 7 years ago | (#18374091)

Jessy Liberty, the man of magic numbers!

probably a good second book on the language... (1)

bradkittenbrink (608877) | more than 7 years ago | (#18372077)

CLR via C# []

It skips over a lot of the hand holding that a "Learn Foo in X Days" book will give you but goes in to great detail about how the language is implemented, often giving examples of how C# code is compiled to IL assembly language and sometimes further giving examples of how it will be compiled by the JIT compiler into x86 assembly language.

Re:probably a good second book on the language... (0)

Anonymous Coward | more than 7 years ago | (#18373863)

I think CLR via C# is a good 3rd book, as it goes pretty deep into language stuff. First books usually teach the language, the second should teach the standard libraries. I would reccommend something like Petzold's Programming Windows with C# (you'll have to look for used versions) or his later Windows Forms books: Programming Microsoft Windows Forms (for 2000/XP era) or Applications = Code + Markup (which handles forms and XAML, the GUI markup language in Vista and WPF-Everywhere) There's also a decent intro to C# for C and C++ programmers on his site [] .

Re:probably a good second book on the language... (1)

ClosedSource (238333) | more than 7 years ago | (#18390519)

I agree it's a great book although not really for C# beginners. The remarkable thing about this book is that although it is published by Microsoft Press, Jeffrey Richter (the author) points out of number of pitfalls and downright poor design decisions made in designing C# and the .NET framework. Years ago Richter wrote "Advanced Windows" which was considered the best book for serious Win32 development.

Inside C# by Tom Archer (1)

PhrostyMcByte (589271) | more than 7 years ago | (#18372079)

I already knew C and C++, so I can't speak from a beginners point of view. Inside C# did the trick for me.

Head First Java (1, Insightful)

MrAnnoyanceToYou (654053) | more than 7 years ago | (#18372143)

Around here, C# is a silly thing to ask a question about. As a side note, if you really want to learn C#, you can just go to M$'s website and poke around. There are piles of tutorials. I hate to say it, but I don't recommend "Learning C#" from O'Reilly. They're great on lots of other stuff, but that particular book was a good primer on the syntax of C# - which is surely important - and not that great a primer on the actual functionality of Visual Studio. The only great thing about Microsoft development is the tools you have to do it with. Taking full advantage of them is extremely important.

Re:Head First Java (2, Insightful)

Tim C (15259) | more than 7 years ago | (#18372943)

Around here, C# is a silly thing to ask a question about.

Which is a shame, as it's a pretty nice language backed up by a comprehensive framework. If it weren't for the fact that it's from MS and therefore automatically evil in the eyes of so many people here, I think it would be rather more popular.

that particular book was a good primer on the syntax of C# - which is surely important - and not that great a primer on the actual functionality of Visual Studio.

That's probably because it's called "Learning C#" and not "Learning to Develop C# with Visual Studio". Other IDEs are available, such as the open source #Develop, and Borland's C# Builder. The .NET Framework SDK also ships with all the tools you need to compile and debug C#, and combined with Nant (a .NET port of Ant) may well be sufficient for small-scale development work or those who dislike IDEs.

The only great thing about Microsoft development is the tools you have to do it with.

Plus the size of the potential user base, the amount of information available on MSDN, the sheer number of forums and other user-driven resources... In fact, coming from a Java background, Visual Studio is one of the weakest points of developing for Windows, it really doesn't hold a candle to IDEs like Eclipse or even JBuilder in many areas. (Not that either of those IDEs are anything like perfect)

Re:Head First Java (1)

ncmusic (31531) | more than 7 years ago | (#18373713)

Do you mind commenting on what features VS "doesn't hold a candle to" in Eclipse and JBuilder?

Re:Head First Java (1)

Westley (99238) | more than 7 years ago | (#18375617)

I've got a blog entry on this. Some of my comments were off base because I didn't know about some of the features of VS2005 at the time, but the ones I really would like fixed:
1) Open Resource (Ctrl-Shift-R in Eclipse)
2) Open Type (Ctrl-Shift-T in Eclipse)
3) Organise imports (using directives in C#; get rid of ones I don't use, sort the ones I do, add any necessary)
4) Make the overload tooltip show more than one ruddy entry at a time!

Oh, and compile-incrementally-on-save-so-quickly-you-don't -notice is rather handy too.

Here's the blog entry: 22/79631.aspx []

I haven't tried Orcas yet (hope to do so with the March CTP really soon) - perhaps some of it will have been implemented there...


Re:Head First Java (1)

acidrain (35064) | more than 7 years ago | (#18373283)

The only great thing about Microsoft development is the tools you have to do it with.

It's sad, and I'm sure to get ripped to shreds for this, but VC8's debugger is the main reason I haven't switched to Linux on the desktop. Forget editors, conciseness of programming language, little penguins running in hamster wheels, whatever, it's only the debugger that matters when it comes to the hard part.

Re:Head First Java (2, Funny)

Metasquares (555685) | more than 7 years ago | (#18373721)

What's wrong with gdb?

Re:Head First Java (1)

acidrain (35064) | more than 7 years ago | (#18373865)

Um? Using gdb is like surfing the web by connecting to port 80 with telnet. Probably there is a decent gui interface to it out there, but the last time I tried finding one, it didn't go well for me. I'd also want it to have a nice stable edit-and-continue integration, so I can iterate on code at the same speed as someone working with script...

Re:Head First Java (1)

lavid (1020121) | more than 7 years ago | (#18375403)

The GUI for gdb is ddd (Data Display Debugger)

Re:Head First Java (1)

raddan (519638) | more than 7 years ago | (#18376801)

And the manual is available here [] . I volunteered work for this briefly, and I was under the impression that it was going to be published in print form as well, but I get the impression from the GNU print manuals webpage that they never did get around to actually printing it.

Re:Head First Java (1)

WED Fan (911325) | more than 7 years ago | (#18374375)

What's wrong with gdb?

God, I wish I hadn't burned my Mod points, you'd get a +1 Funny from me. God, I love this kind of humor. You're British, right?

If you know C++ there is always room to... (0)

Anonymous Coward | more than 7 years ago | (#18372149)

Learn more C++. Not even Bjarne can claim to fully know C++!

Seriously though, make sure that any C# app you're expected to write is semi-trivial. Building an app that works _with_ Windows (as opposed to working _on_ Windows) can be pretty tough (depending on the app).

I don't think C# is on my resume anymore... The things I want to do aren't fun in Windows...

Charles Petzold (1)

Mordio (606397) | more than 7 years ago | (#18372151)

I liked the books of Charles Petzold: Programming in the Key of C# [] and Programming Microsoft Windows with C# [] . I don't know if they are up to date but I think they provide a basic overview.

Re:Charles Petzold (3, Informative)

DudeTheMath (522264) | more than 7 years ago | (#18373677)

I can't agree more. I'd also recommend his free .NET Book Zero [] , which is specifically aimed at C/C++ programmers, and did I mention it's free?

Re:Charles Petzold (1)

neelm (691182) | more than 7 years ago | (#18376503)

I agree as well... damn, on a day with no mod points too.

Pro C# 2005 and the .NET 2.0 Platform (1)

kestasjk (933987) | more than 7 years ago | (#18372201)

"Pro C# 2005 and the .NET 2.0 Platform" by Andrew Troelsen is an excellent book.

It isn't a "recipe" book that tells you how to do common things, or something that you read from cover to cover to learn the basic syntax for non-programmers, it's more of a reference book..

In a nutshell:
  • The C# programming language.
    • The C# syntax specific stuff, if you wanted to learn Mono this is the only applicable chapter. Basic syntax, collections, object lifetime, Interfaces, Delegates, Generics, etc. Goes into lots of detail here.
  • Programming with .NET assemblies.
    • A fairly small section, only ~100 pages. How the CLR works, Multithreading, publishing .NET assemblies securely, using proprietary 3rd party assemblies, permissions, processes+contexts, etc.
  • Programming with .NET libraries.
    • If you know Java well this may be the chapter you refer to the most. File I/O, .NET remoting, XML, Windows Forms, ADO.NET DB access. It doesn't go into huge detail with any of these (it would have to be another book in itself), but gives you a very good sense of what you have available and how to do the basic things, without going into the specifics.
  • Web applications and XML web services.
    • Another small section which I haven't looked at, but it's probably similar to the previous section except geared towards ASP.NET servers instead of client libraries.

Translate (2, Insightful)

devnul73 (749914) | more than 7 years ago | (#18372229)

This might sound simplistic, but take some of your old code that you are very familiar with and rewrite it with C# constructs, if possible. I'll admit my knowledge of C# and its relationship to other languages in minimal, but this has almost always helped in learning of new syntax/datatypes/limitations for me.

Re:Translate (1)

DragonWriter (970822) | more than 7 years ago | (#18377613)

I agree that translating old code (or reimplementing it from the idea, not necessarily translating the code itself) is a good way to learn, but it helps to have a good book on the target language to get the idioms of the new language.

Book???? (2, Insightful)

khooee (1076485) | more than 7 years ago | (#18372397)

Echo the 1st reply..

Books are a waste of time.. The only time I'll buy a book is if the info is very difficult to source online.

If you can read C++, you can read C#. The class naming and hierarchy of their APIs are so verbose that you should be able to understand any sample code.

If you're not in any projects (open source or not), get in & hack hack hack away. C# is pretty widespread now so any issues, just Google it. If you don't like MSDN doco, learn to like it, because it's free and pretty good once you know how to navigate it. And there are a truckload of MSDN blogs as well.

Also look at: - []
- [] (Dissecting a C# Application on the bottom - is about SharpDevelop IDE, which is pretty good)

Who are you planning to be employed by? You might be better off learning .NET 3.0 (WPF, WCF and Workflow Foundation) since it's where Microsoft want to go... however corporates will probably give it a few years before it becomes more mainstream.

Re:Book???? (3, Insightful)

LizardKing (5245) | more than 7 years ago | (#18372763)

You suggest books are a waste of time, and to just dive in and start hacking. This attitude is a major reason why there is so much bad code out there. As I point out in reply to another post that recommends a book on Lisp to someone wanting to learn C#, if you don't know the common idioms of the actual language you are using then you will produce terrible code. A good book wont just teach you the nuts and bolts of a language such as the raw syntax, it will also encourage good practices - what I think James Coplien or Tom Cargill described as teaching "programming in the large".

Re:Book???? (1)

Shados (741919) | more than 7 years ago | (#18373127)

.NET 3 is only an extension of .NET 2, but its the same language. Its basically the J2EE of .NET, more or less. An enterprise framework (or a piece of one, since .NET's way is to split it up).

And for being able to read C++ equalling being able to read C#... thats true for the base stuff. Pop in a custom control with a GUI designer, and your average C++ programmer will quickly go "What...the....f...." at the declarative attributes programming model of that kindda task. Just an example.

Re:Book???? (1)

Thyamine (531612) | more than 7 years ago | (#18373217)

I agree that there's a lot of information online, but there are days when I (and I'm sure a lot of us) get annoyed trying to find an example of what we want to do, or think we can do. I'm always a lot happier having an actual book sitting on my desk that I can poke through and reference when I want. Not to mention I always find something I didn't know about just by paging through things that look interesting.

And yes, books easily become out of date, but I just as often stumble on old web pages that no one has bothered to update in quite some time.

I can recomend... (2, Funny)

Edam (911039) | more than 7 years ago | (#18372485)

I can recomend the Holy Bible (King James Version, leather bound): ibrary/dp/0834003511/ref=ed_oe_h/002-6705002-67456 10 []
to help absolve your sins, my son...

Yes, that is very good too but... (1, Flamebait)

Iloinen Lohikrme (880747) | more than 7 years ago | (#18372603)

Yes, that is very good too, praise the lord! But ask yourself, how can bible help you when your beloved project manager is shouting developers, developers, developers and you suddenly find yourself in path of flying furniture's? I can say that praising lord doesn't do a squad. But alas, help is on a way! For all those miserable souls who don't mind giving their soul in exchange of dark forces of hell, there is the Necromancer Bible. Unfortunately Amazon doesn't carry this item currently. So what to do in a mean time? Well, one could start from The Anarchist Cookbook [] and show those bastard colleagues on how object class hierarchy should be done. Nothing really starts the day better than seeing your office go way high into the sky and dropping down.

Re:I can recomend... (0)

Anonymous Coward | more than 7 years ago | (#18373187)

I think he should invest in some Viagra, too. I had a co-worker who had to use C# for about a year, and he quickly developed acute impotency. His wife left him because he couldn't bone her anymore. He couldn't even masturbate himself since he just couldn't get it up. Eventually he requested a transfer to a project using Python, and now he's got a rock hard cock. Sometime he gets a raging boner while coding!

Learning C# (1)

jackv (1068006) | more than 7 years ago | (#18372503)

The only one I've used is "Learning c#" Jesse Liberty . Which is useful to reference. But in reality, if you know OO , then as soon as you get on top of the syntax, the best thing to do is write code.

Safari (1)

wikinerd (809585) | more than 7 years ago | (#18372509)

For technical IT books I recommend Safari [] . It has saved me a lot of money since now I can read all new IT technical books online and I don't have to buy dead trees anymore. It has also saved me a lot of space on my library, and the search feature allows me to find quickly what I need. For learning a new language, Safari is surpassed only by open-source, and if you combine the two you can learn C# as fast as you count 1, 2, 3.

C# Precisely (1)

perl (117616) | more than 7 years ago | (#18372559)

P. Sestoft and Henrik I. Hansen, C# Precisely, The MIT Press 2004; second updated printing 2006. ISBN 0-262-69317-8. []

SICP (1)

John Nowak (872479) | more than 7 years ago | (#18372571)

Structure and Interpretation of Computer Programs [] (full text online). Anyone who hires someone who doesn't know what's in this book is hiring people for the wrong reasons. Unless you want to work for such people, it doesn't make sense to go into the workforce with such a narrow knowledge (C/C++/C#). Learn everything you can about everything.

Re:SICP (1)

John Nowak (872479) | more than 7 years ago | (#18372583)

Just a quick followup -- One of the best ways to learn C# is to learn languages like Haskell and Smalltalk so you get it from all angles. If you learn C# with a knowledge of only C++, you'll just be writing C++ in C#.

Re:SICP (0)

Anonymous Coward | more than 7 years ago | (#18373227)

Haskell? Didn't he say that he already reddit?

Re:SICP (1)

LizardKing (5245) | more than 7 years ago | (#18372739)

Sorry to go against the orthodoxy, but the only reason why you've mentioned SICP is as a way of saying "look at me, I know Lisp, I'm a true hacker". How many times have you really used Lisp in for commercial development, or applied its idioms clearly in another language? Lisp programming techniques do not translate well to the popular languages for commercial development such as C, C++, Java or C#, you end up with obscure hacks and sub-optimal code because you don't use the common idioms of those languages. I speak from experience as someone who has had to rewrite large chunks of C++ code written by Lisp hackers too arrogant to learn C or C++ properly. Lisp and Scheme have their place, but that's as academic curiosities which is why projects like Guile are languishing.

Re:SICP (3, Interesting)

John Nowak (872479) | more than 7 years ago | (#18372829)

SICP isn't about learning Lisp or Scheme. It's about learning how to program.

That said, how many times have I used Lisp for commercial development? None. How often have I applied its idioms? I do so on a daily basis.

SICP-Fear,Uncertainty, and Doubt. (0)

Anonymous Coward | more than 7 years ago | (#18376555)

"Lisp and Scheme have their place, but that's as academic curiosities which is why projects like Guile are languishing."

That a little like saying BSD is dying just because you don't hear a lot about people using it. Lisp, Scheme, Smalltalk, Mumps and even Forth are all being used, and most likely because of "competitive adavantage", you're not going to hear about it. Learning a language other than your native one is hard. Why would one think that computer languages are an exception? Especially when one is going to another paradigm (Imperative to OOP) as well as new syntax. Java and C# succeeded in part because they're not leaps, but small jumps towards what Lisp and Smalltalk already are. Some however may think it makes more sense to make a leap, than baby steps into the future, and gain benefits NOW, rather than when the rest of the world is ready for them.

Re:SICP (1)

bonespsk (139402) | more than 7 years ago | (#18383093)

Here's a commercial use of lisp for ya [] . If you've ever searched for airfares on Orbitz, Kayak, etc, you've been using a Lisp-based engine.

A book doesn't help... (0)

Anonymous Coward | more than 7 years ago | (#18372639)

You don't learn programing by reading a book.

You can show the book around and say "Look, I learn programing.".

You can smell at the book, because new books smell good.

You can put a reading sign made by your daughter into it.

But you don't learn programing by reading a book.

(Take that from an expert.)

Better to learn OO than C# (1)

Dr_Barnowl (709838) | more than 7 years ago | (#18372715)

Get the Gang of Four [] , and other books on O-O like Holub on Patterns.

Don't bother with books aimed purely at C#. If you know OO well, you can appreciate other languages too. I recently went from coding C# to Java for the first time, with very little change of pace, simply because the tools, APIs, syntax and general patterns are so similar. I'd expect the same from C/C++, because the C# syntax is both similar and simpler. In particular, context-completion features with popup help in IDEs mean that I very rarely refer to the docs anymore. VB6 used to pop up just the method signatures, with VS2005 and Eclipse, a short description of the routine pops up as well.

But grokking OO after being a procedural programmer for a long time is the hardest mental hurdle to jump. I worked with a bunch of VB6 programmers who just didn't get it, even though the language supports polymorphism reasonably well. Since I left they've transitioned to C# - I hope they had a major epiphany, because if not, they have a lot of big, static classes with very large methods hanging around.

Re:Better to learn OO than C# (1)

Shados (741919) | more than 7 years ago | (#18373091)

Be careful about that. While its true in the basics, as soon as you get in enterprise level development, everything changes. Implementing many patterns in C# is different than in Java (or at least, you don't implement them in the first place... I'm getting SO sick of java programmers coding Observer from scratch in C#...), and at the enterprise level it all changes: introspectable objects, messenging, caching, data access, data layer design, all of the web stuff, distributed computing and web services, multi-threading (yup! even something that basic is quite different), etc.

A OO basic is definately a must, but that should be mastered by the end of Uni (though I know many don't show much about it).

Once thats there, I personally suggest the Microsoft Press books for the various MCTS certifications. They assume you know the basic cross-language stuff from the get go, and focus only on the particularities of the environment. Excellent books.

Better to learn Paradigms than C# (0)

Anonymous Coward | more than 7 years ago | (#18376807)

"Get the Gang of Four, and other books on O-O like Holub on Patterns."

Two others.

The Nature of Software and the Laws of Software Process [] (seriously)

Head First Object-Oriented Analysis and Design: A Brain Friendly Guide to OOA&D [] (For those having trouble grokking OOP)

BTW GOF and Holub are about patterns, not just OOP.

Re:Better to learn Paradigms than C# (1)

Tablizer (95088) | more than 7 years ago | (#18383063)

Head First Object-Oriented Analysis and Design: A Brain Friendly Guide to OOA&D (For those having trouble grokking OOP)

Noooooo! This book is eeeevil. It encourages *programmers* to add products and product classifications by hardwiring them into code. This is not how it is done in practice nor should it be. In practice you have product tables (RDBMS) and product classification tables (many-to-many relationship with products). The code will then apply features based the product & classification table(s), but you do not directly create product taxonomies/classifications *in* the code itself. The users add to these tables, usually not the programmers. If you were creating an HR application, would you hardwire employees into the code? Didn't think so.

Re:Better to learn Paradigms than C# (CORRECTION) (1)

Tablizer (95088) | more than 7 years ago | (#18383283)

I made a mistake here. It is their "Head-First Patterns" book that does this, not necessarily the one listed here. I apologize.

MSDN (1)

Ingolfke (515826) | more than 7 years ago | (#18372925)

Re:MSDN (1)

soosterh (137200) | more than 7 years ago | (#18373155)

Oddly the parent article is correct. C# is one of the few languages that has comprehensive on-line documentation. If you start here: Visual C# [] you will find that there is plenty of quality material. Also most the reference material is NOT specific to those running MS Dev Studio. The reference material gives nice clear examples.

A section of that page:

Using the Visual C# IDE []
Introduces the Visual C# development environment.

Writing Applications with Visual C# []
Provides a high-level orientation covering common programming tasks using C# and the .NET Framework, with links to more detailed documentation.

Migrating to Visual C# []
Compares the C# language to Java and C++ and describes how to use the Java Language Conversion Assistant to convert Java and Visual J++ applications to Visual C#.

C# Programming Guide []
Provides information and practical examples on how to use C# language constructs.

C# Reference []
Provides detailed reference information on C# programming concepts, keywords, types, operators, attributes, preprocessor directives, compiler switches, and compiler error and warnings.

C# Language Specification [] Links to the latest version of the C# Specifications in Microsoft Word format.

Visual C# Samples []
Sample source code demonstrating how to program using Visual C#.

For all you no-book response people (0)

Anonymous Coward | more than 7 years ago | (#18373045)

Did he ask 'should I get a book'?

No. Perhaps those of you that don't read books simply have a reading comprehension problem?

He asked what books to get. He didn't ask what your opinion of using a book to get a jumpstart on a language is. Personally, I've been doing this for 20+ years and a good book for base reference never hurts. Honestly, between the irrational M$ bashing and the need for everyone to either post a joke or just plain not answer the question, I have no idea why anyone 'asks slashdot' anything.

On the plus side, this is probably the first question I've seen where most of the answers ARE answers. Well done for those of you that bothered to post a useful response.

Ignore the no book people - that's strictly a personal issue and is silly thing to post. Nothing beats reading a book at night (or in the porcelain office) to help get familiar with the language - I find it most useful when I need to do something 'weird' and I remember reading a blurb in a book somewhere about how to solve it.

On to business: I'm mostly concentrated on the side (I'm still not terribly impressed with .NET applications due to the way the database works - watch for DLINQ - it's VERY VERY cool and will hopefully fix the DB issues) O'Reilly C# Essentials is cheap and a nice little reference to get the syntax straight. Pro ASP.NET 2.0 in C# 2005 is a great book getting into ASP.NET. Someone already mentioned Safari - I've used it but I'm not sold on it as far as using it to find answers. I find 'google .net 2.0 ' works very well.

MCAD (1)

nikolajsheller (553835) | more than 7 years ago | (#18373201)

If you are looking for information on the .NET framework and namespaces, not syntax and language features, then consider getting one of the MCAD books.

They cover a lot of subjects concerning the .NET framework, assemblies, deploying, databinding, controls, web services and many other things.

Having worked with .NET for a bit over a year now, I have learned a lot of things about the .NET framework by reading the "Developing and Implementing Windows-based Applications with Visual C# .Net and Visual Studio .NET", that I have not touched upon otherwise while working with .NET. The book is a bit dated compared to the newer .NET frameworks, but still covers a lot of ground that can be very useful.


Programming C# - Jesse Liberty (1)

unborracho (108756) | more than 7 years ago | (#18373655)

I just paged through programming C# by jesse liberty (o'reily) - It's a great book and there's really only a few things about C# that are different from java, like the yield keyword, operator overloading, and delegates/events, and C++ Style compiler directives.

I was in the same position (1)

keenada (1018094) | more than 7 years ago | (#18373991)

I graduated college without any C# experience, and heard the same rumours -- that C# knowledge opens a lot of doors. I bought the O'Reilly 'Programming C#' book by Jesse Liberty, worked through the examples, and it gave me enough knowledge to get hired as a C# developer.

Since I've been developing C# professionally, I've found the 'C# Cookbook' and the 'ADO.NET Cookbook' extremely useful (both by O'Reilly). People on my team are constantly borrowing these books from me.

Essential C# 2.0 (1)

plopez (54068) | more than 7 years ago | (#18374203)

From Addison-Wesley, by Michaels. ISBN 0-321-15077-5.

It goes from 'Hello World' to generics, delegates, interfaces, reflection, threading etc. In short if you are stuck in a MS shop and have to build complex code (like I once was), it is very helpful.

Re:Essential C# 2.0 (1)

Guidii (686867) | more than 7 years ago | (#18383399)

I'm reading this one right now, and although it does do a good job of presenting C#, I'm getting quite frustrated by the lack of editorial oversight. For example (page 81)

Binary operators such as + and - are associative because the order in which the operatos are applied is not significant; a+b+c has the same result whether a+b is performed first, or b+c is performed first.
(For any of those who don't get it, subtraction is not associative. [] )

There are many similar examples where the author demonstrates a lack of understanding of the material. That being said, most of the mistakes I've seen deal with unimportant trivia (as illustrated by the quote above), and not with core language details. On those points the author seems to be quite knowledgeable.

Even with all my grumbling, I think the book is worth reading. Just remember to use your own judgement when you're reading.

RE: C# Book Recommendations (1)

jdkc4d (659944) | more than 7 years ago | (#18374651)

I learned a lot from this book: Pro C# 2005 and the .NET 2.0 Platform [] . Since C# relies heavily on the .NET or MONO frameworks, I would also suggest downloading the MSDN Library. While you can read this all online, having it locally is very helpful when learning about .NET (also its free). Unless you have Visual Studio, I would also recommend downloading the C# Express IDE from Microsoft: [] harp/ []

To learn the important things about C# (1)

rmull (26174) | more than 7 years ago | (#18374855)

I'm assuming you're doing this on windows.

1) Write a small program to start understanding the syntax. Use code you find on the web for reference.

2) Become familiar with the following projects, and understand how they are implemented:
    a) mbUnit [] , a fantastic example of modern, idiomatic c# design.
    b) DynamicProxy [] , which pushes (abuses?) the CLR's reflection APIs past what you might think they are capable of.

3) Get a copy of .NET reflector [] , which you'll need to overcome the lack of documentation for key useful pieces of the framework. This thing is magical.

4) Write something larger.

It's just java. (0)

Anonymous Coward | more than 7 years ago | (#18375959)

Buy a java book. Read it. Then just write lines of code that fall somewhere between C++ and Java code, and it'll compile in C#. ;p

Effective C#: 50 Specific Ways to Improve Your C# (1)

whitefox (16740) | more than 7 years ago | (#18376121)

After getting the basics of the language down, I would definitely recommend "Effective C#: 50 Specific Ways to Improve Your C#" by Bill Wagner (ISBN 0321245660).

Re:Effective C#: 50 Specific Ways to Improve Your (1)

Guidii (686867) | more than 7 years ago | (#18383317)

I feel that Meyer's "Effective C++" was a wonderful book, and should be mandatory reading for anyone developing in C++. So I was thrilled to find that Meyer's had endorsed an "Effective C#", even though he wasn't the author.

Unfortunately, I have to say that I was disappointed by Effective C#. The author often made suggestions without explanations. Like "Always use the CLR's built-in types (Int32, String) instead of the C# language specific types (int, string). No real explanation or justification given. (Come to think of it, I'm not sure if the author wanted you to use the built-ins or the CLR types - since no good justification was given, I just can't remember what the recommendation was.)

There is some good content in the book - just not enough to justify the "Effective" title.

Design Patterns in C# (1)

MilwaukeeCharlie (911858) | more than 7 years ago | (#18376511)

I liked this one: Design Patterns in C# []

Though it isn't a primer (obviously, given the title) it does contain quite a bit of good information. The author was responsive to my email inquiries about it as well.

I question your assumption (2, Informative)

Anonymous Codger (96717) | more than 7 years ago | (#18377023)

My experience in a recent job search is that the demand for Java exceeds that for C#. Unless you're enamored of Microsoft software and operating systems, you might want to learn Java first.

One thing for sure - the demand for C++ programmers has collapsed, at least in the DC area.

Re:I question your assumption (0)

Anonymous Coward | more than 7 years ago | (#18377181)

I cuncur, not only is there a great deal of demand for java programmers, you also won't have that dirty feeling that coding in MS 'languages' leaves behind.

The Camel Book- learn Perl instead (0)

Anonymous Coward | more than 7 years ago | (#18377039)

Forget C# - Learn Perl!

It's miles behind Perl anyway. Maybe by the time they get to C# version 5 or 6 it will be as expressive and flexible as Perl.

I know this sounds like flamebait, and for that I am sorry.

Seriously - I've been programming C# 2 for over a year and I'm constantly blown away by how brittle the language is. The .Net Framework class library looks great on paper, but in practice it just forces you into doing things one particular way. If that way is sub-optimal, too bad.

ASP.Net 2.0 is nice with its MasterPages and Web.Config features, but unless you're doing the most simple kind of web development without any kind of creativity involved, ASP.Net 2.0 will just end up getting underfoot and in your way. It is speedy though, which I like.

Even if Perl6 takes another year to get released it will still be far, far ahead of where Microsoft has taken C#.

Besides. Vista is going to be Microsoft's tombstone and C#'s market will only shrink.

I would have signed in if I weren't on a public computer.

My C# cook recommendations (1)

Tronster (25566) | more than 7 years ago | (#18378059)

I've been on/off developing in C# since 1.0 (2002). Two books I'd recommend, both my Microsoft Press:

"Applied .NET Framework Programming" ork-Programming/dp/0735614229
- Recommend reading this first, cover to cover
- It gives the gritty details of .NET, with most all examples in C#.
- Services as an invaluable reference

"Visual C# 2005 Step By Step" /dp/0735621292
- Specifics on the latest release of C#
- While guided, not too much fluff

Good luck!

check your local public library (1)

shalla (642644) | more than 7 years ago | (#18379955)

I'd also like to suggest that if you aren't sure, you can always check your local public library. I'm the computer librarian (one of two) at mine, and we have most of the books I've seen mentioned here.

So if you don't want to blow $40 on Pro C# 2005 and the .NET 2.0 platform by Andrew Troelsen and then decide that you really wanted was Programming C# by Jesse Liberty, that's always an option, too. At least it is if one of your local libraries has a good computer collection.

visual c# 2005 (1)

agentker (919647) | more than 7 years ago | (#18379999)

I'm taking a C# class now and the book we use is pretty good. Beginning Visual C# 2005 [] Of course, I'm not familiar with any other books on the subject, but my professor picked this one out of a whole bunch, so he must have had a reason!

Here's a good start (0)

Anonymous Coward | more than 7 years ago | (#18380143)

When all else fails, use O'Reilly [] .

C# Essentials (2, Informative)

InsertCleverUsername (950130) | more than 7 years ago | (#18382513)

You're already very familiar with OOP. If you're like me and just want the facts in hurry, I'd recommend something like C# Essentials: i/dp/0596003153/ref=pd_bbs_sr_1/103-5749589-837266 3?ie=UTF8&s=books&qid=1174093734&sr=8-1 []

It covers the language as quickly as anything I've seen. I felt fairly up-to-speed after a long weekend with this book. It won't waste your time telling you how to code "hello world" or giving you architectual guidance (there's plenty of that online). It's cheap too.

Your biggest hurdle will be learning the .Net framework libraries and getting proficient will other aspects/pitfalls of .Net development. The language itself will be easy for you.

I highly recommend... (1)

littlewink (996298) | more than 7 years ago | (#18383649)

Wiping the Slate Clean with C# [] published by Breakthrough Technologies, Inc..

It's the best C# introduction for both seasoned programmers and newbies.

FDG (1)

JAFSlashdotter (791771) | more than 7 years ago | (#18383691)

Framework Design Guidelines []

It won't teach you to program in C#, but it will explain why things are the way they are, and give you a lot of good rules to keep you from making bad mistakes. Especially if you want to make reusable libraries, but even if not.
Load More Comments
Slashdot Login

Need an Account?

Forgot your password?