Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. What book would you recommend to learn C# from 0?

What book would you recommend to learn C# from 0?

Scheduled Pinned Locked Moved The Lounge
c++learningcsharpquestion
44 Posts 29 Posters 4 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • OriginalGriffO OriginalGriff

    I'd disagree to an extent: they ripped C++ to bits when they first created C# and got rid of a lot of the "dangerous" stuff - memory leak causes and so on - to create a simpler language that was faster to develop with than native C++ as a result. Since then, they have been layering on more complexity - some of it useful and justified, some of it badly abused. It's perhaps getting to the point where C# needs to be ripped apart and the same exercise done again (.NET Core would have been a good opportunity to do this)

    Bad command or file name. Bad, bad command! Sit! Stay! Staaaay... AntiTwitter: @DalekDave is now a follower!

    J Offline
    J Offline
    James Lonero
    wrote on last edited by
    #41

    Actually, they simplified C++, as did Java. C++ was getting quite complicated and watching Bjarne Stroustrup running through the variations of template examples was enough to make your head swim. Both Java and C# are good attempts to simplify what C++ has become. Also, most people decided to take up C# because of the pointer problems with C++. Too many times, a raw pointer would be missed or deleted too soon and problems would arise. This was occurring in much larger programs. So, I am happy (so far) with C#.

    1 Reply Last reply
    0
    • OriginalGriffO OriginalGriff

      It has it's uses - you can;t do Linq without it - but when you get lazy f'wits using it on every variable definition it's a PITA for maintenance:

      var i = 666;

      Is just lazy.

      var p = ComplicatedFunctionInAnotherClass(long, list, of, parameters);

      Is lazy, stupid, and uncaring of maintenance or the poor sod who will have to do it.

      Bad command or file name. Bad, bad command! Sit! Stay! Staaaay... AntiTwitter: @DalekDave is now a follower!

      J Offline
      J Offline
      James Lonero
      wrote on last edited by
      #42

      The first example is OK. I as a maintaining programmer know that i will be an int of some sort. The second example, what is p? Do I have to look at the function or intellisense to figure it out? Do I need to look at the context of how p is used later? No to all of these. The professional engineer's job is to not only make the product work as expected but to also make it easier for the next engineer to pick up the work and take it to the next step. (It's in the IEEE code of ethics.) It would seem that is the difference between a programmer/code jockey and an engineer.

      1 Reply Last reply
      0
      • M Member 13046479

        Agreed! Linq makes things easier to write, easier to maintain, easier to understand, and just makes code 'prettier'. I cannot stand ugly code!

        J Offline
        J Offline
        James Lonero
        wrote on last edited by
        #43

        Does linq make the code more readable to the next programmer who picks up your code? If the linq covers a simple loop with some decisions inside which will be easier for the next person who maintains the code? Writing code for an organization with multiple programmers and engineers, not only must your code perform what is intended without breaking, but must be as quickly understandable by the next person who pick up the code. Because, you can be sure that your code will change as the customer needs change.

        1 Reply Last reply
        0
        • J Joan M

          Hi all, Coming from Visual C++. I'll have a little bit of time in a while and I'd love learning C#... Which book would you recommend me? Thank you! :thumbsup:

          B Offline
          B Offline
          BryanFazekas
          wrote on last edited by
          #44

          I've had good luck with the SAMS books. Each is a series of lessons that typically take an hour to do, although anyone with programming experience will zip through the first third of the book. For people that learn best by doing (like me), the lessons with examples and programming assignments works well. A lot of the books include a CD/DVD, and programming examples are available for download. The current book is SAMS Teach Yourself C# in 21 Days[^]. Note: I have not personally used this book, although I've had good luck with a number of SAMS titles in various areas. If I was learning C# now, it's the first book I'd buy. I do have WROX Professional C# 2008 (which tells you when I learned C#). That kind of book is an excellent reference, valuable to own, but not (IMO) a good learning tool. I spotted another book on Amazon, this one is supposed to be a platform independent book on C#: SAMS Teach Yourself the C# Language in 21 Days[^]. Although I haven't seen it discussed, I tend to buy in ebook format, as it's easier to cart the books around. I open books on a tablet and have that standing next to the monitor when learning something new, and even better when using a book as a reference. However, I prefer hard copy for learning, but space and weight considerations have pushed me to ebooks.

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups