Slashdot Mirror


C# Book Recommendations?

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?"

25 of 116 comments (clear)

  1. Book? by TodMinuit · · Score: 2, Insightful

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

    --
    I wonder if I use bold in my signature, people will notice my posts.
    1. Re:Book? by WebCrapper · · Score: 2, Insightful

      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...

    2. Re:Book? by Osty · · Score: 4, Interesting

      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?

    3. Re:Book? by cyclop · · Score: 3, Interesting

      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.

      --
      -- Patent no.123456: A way to personalize /. comments with a sig attached to the end.
    4. Re:Book? by teslar · · Score: 4, Interesting

      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.

      Results:

      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);
            end
      end


      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.

    5. Re:Book? by CastrTroy · · Score: 2, Insightful

      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.

      --

      Anthropic principle: We see the universe the way it is because if it were different we would not be here to see it.
    6. Re:Book? by CastrTroy · · Score: 3, Insightful

      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.

      --

      Anthropic principle: We see the universe the way it is because if it were different we would not be here to see it.
    7. Re:Book? by CastrTroy · · Score: 2, Insightful

      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.

      --

      Anthropic principle: We see the universe the way it is because if it were different we would not be here to see it.
  2. A few by Anonymous Coward · · Score: 4, Informative

    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 asp.net 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 asp.net 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 asp.net 2.0 with c# 2005 by apress. It will give you a deeper look into more advanced topics of asp.net.

    1. Re:A few by Doctor+Memory · · Score: 2, Interesting

      i'd look into beginning asp.net 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... :/
      --
      Just junk food for thought...
  3. A programmer's introduction to C# by martijn-s · · Score: 4, Informative

    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).

    http://www.apress.com/book/bookDisplay.html?bID=45 4

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

    1. Re:A programmer's introduction to C# by xtracto · · Score: 3, Insightful

      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" ?.

      sheesh!

      --
      Ubuntu is an African word meaning 'I can't configure Debian'
  4. MSDN by jfclavette · · Score: 2, Informative

    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.

  5. Translate by devnul73 · · Score: 2, Insightful

    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.

  6. Book???? by khooee · · Score: 2, Insightful

    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: - http://msdn.microsoft.com/msdnmag/
    - http://www.apress.com/free/ (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.

    1. Re:Book???? by LizardKing · · Score: 3, Insightful

      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".

  7. I can recomend... by Edam · · Score: 2, Funny

    I can recomend the Holy Bible (King James Version, leather bound):
    http://www.amazon.com/Bible-Giant-Print-Personal-L ibrary/dp/0834003511/ref=ed_oe_h/002-6705002-67456 10
    to help absolve your sins, my son...

    --
    "Beware of he who would deny you access to information, for in his heart he dreams himself your master." -Pravin Lal
  8. Re:SICP by John+Nowak · · Score: 3, Interesting

    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.

  9. Re:Head First Java by Tim+C · · Score: 2, Insightful

    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)

  10. Re:Charles Petzold by DudeTheMath · · Score: 3, Informative

    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?

    --
    You save only 59 seconds over 8 miles by going 75 instead of 65. Do you really have to pass that guy? Do the Math!
  11. Re:Head First Java by Metasquares · · Score: 2, Funny

    What's wrong with gdb?

  12. Re:Even if he wants books by plover · · Score: 2, Informative
    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.

    --
    John
  13. Don't get the Nutshell one by Erioll · · Score: 3, Funny

    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!

  14. I question your assumption by Anonymous+Codger · · Score: 2, Informative

    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.

    --
    No sig? Sigh...
  15. C# Essentials by InsertCleverUsername · · Score: 2, Informative

    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: http://www.amazon.com/C-Essentials-2nd-Ben-Albahar 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.

    --
    Ask me about my sig!