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 0 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.
  • 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:

    P Offline
    P Offline
    PIEBALDconsult
    wrote on last edited by
    #14

    Always read the spec. Anything else is wrong.

    C 1 Reply Last reply
    0
    • P PIEBALDconsult

      Always read the spec. Anything else is wrong.

      C Offline
      C Offline
      CPallini
      wrote on last edited by
      #15

      So you are wrong ;P

      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:

        R Offline
        R Offline
        Ravi Bhavnani
        wrote on last edited by
        #16

        .NET Book Zero[^], without a doubt! /ravi

        My new year resolution: 2048 x 1536 Home | Articles | My .NET bits | Freeware ravib(at)ravib(dot)com

        R 1 Reply Last reply
        0
        • OriginalGriffO OriginalGriff

          Yes you can - but not everyone else will, so you get a lot of lazy coders using var all the time for example and to hell with the poor sod who has to maintain it in six months time!

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

          D Offline
          D Offline
          dandy72
          wrote on last edited by
          #17

          :) Of all the useless things that have been added to the language over the years, var isn't one of them. I've long been opposed to var myself, but these days, when I see I've used var in some of my older code, it generally means the exact type didn't matter to me back then, and it still shouldn't matter to me today. Some will abuse it for sure. But it's got its use.

          OriginalGriffO 1 Reply Last reply
          0
          • R Ravi Bhavnani

            .NET Book Zero[^], without a doubt! /ravi

            My new year resolution: 2048 x 1536 Home | Articles | My .NET bits | Freeware ravib(at)ravib(dot)com

            R Offline
            R Offline
            raddevus
            wrote on last edited by
            #18

            Ravi Bhavnani wrote:

            .NET Book Zero[^], without a doubt!

            Agree 100%! Also, get LINQPad (free at LINQPad - The .NET Programmer's Playground[^]) It's a fantastic tool for writing snippets or entire programs. Great for use with dotNet Book Zero too.

            1 Reply Last reply
            0
            • D dandy72

              :) Of all the useless things that have been added to the language over the years, var isn't one of them. I've long been opposed to var myself, but these days, when I see I've used var in some of my older code, it generally means the exact type didn't matter to me back then, and it still shouldn't matter to me today. Some will abuse it for sure. But it's got its use.

              OriginalGriffO Offline
              OriginalGriffO Offline
              OriginalGriff
              wrote on last edited by
              #19

              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!

              "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
              "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt

              L D J 3 Replies 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:

                C Offline
                C Offline
                Chaos_cat1
                wrote on last edited by
                #20

                Programming in the key of C# by Charles Petzold is excellent, especially when coming from older C-family languages

                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!

                  L Offline
                  L Offline
                  Lost User
                  wrote on last edited by
                  #21

                  OriginalGriff wrote:

                  t has it's uses - you can;t do Linq without it

                  Linq is itself too often used/abused when often it's really not necessary at all, it's backward syntax order is a PITA for those of us that work in multiple languages and later need to unravel some newbies 'I can do it all in one line' compound statements. I'd not loose a second sleep if it were removed entirely.

                  signature upgrading ... please wait.

                  OriginalGriffO 1 Reply Last reply
                  0
                  • L Lost User

                    OriginalGriff wrote:

                    t has it's uses - you can;t do Linq without it

                    Linq is itself too often used/abused when often it's really not necessary at all, it's backward syntax order is a PITA for those of us that work in multiple languages and later need to unravel some newbies 'I can do it all in one line' compound statements. I'd not loose a second sleep if it were removed entirely.

                    signature upgrading ... please wait.

                    OriginalGriffO Offline
                    OriginalGriffO Offline
                    OriginalGriff
                    wrote on last edited by
                    #22

                    I completely agree on the syntax - that's why I use the methods instead - but Linq does have some advantages over the "loads of loops" approach! :-D

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

                    "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
                    "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt

                    M 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:

                      T Offline
                      T Offline
                      Tomaz Stih 0
                      wrote on last edited by
                      #23

                      I know this is not exactly an answer to your question, but I would warmly recommend the following: 1) Job interview questions as by far the best source of condensed information about very handy C# features. A 100 questions interview is worth 314 pages in a book. 2) F..k Occam's razor. Complicate! Go to Stack Exchange and check three solutions to your problem, even if you know how to solve it. It helps build your skills beyond trivial. 3) Twitter for practicing code optimization.

                      1 Reply Last reply
                      0
                      • P Pete OHanlon

                        If you really want to get to the core of C#, I would recommend this book[^].

                        This space for rent

                        S Offline
                        S Offline
                        Simon_Whale
                        wrote on last edited by
                        #24

                        Can't recommend that book enough.

                        Every day, thousands of innocent plants are killed by vegetarians. Help end the violence EAT BACON

                        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:

                          D Offline
                          D Offline
                          danm36
                          wrote on last edited by
                          #25

                          If you want something that starts at the core of C# and - to a degree - programming, I'll have to recommend Rob Miles' Yellow Book[^]. It certainly helped me learn C# quite thoroughly, although I'll have to admit that he was one of my lecturers when I attended university.

                          1 Reply Last reply
                          0
                          • 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!

                            F Offline
                            F Offline
                            Fabio Franco
                            wrote on last edited by
                            #26

                            OriginalGriff wrote:

                            C# needs to be ripped apart and the same exercise done again

                            Couldn't agree more. It's getting so bloated and ugly that it's starting to look like C++.

                            To alcohol! The cause of, and solution to, all of life's problems - Homer Simpson ---- Our heads are round so our thoughts can change direction - Francis Picabia

                            1 Reply Last reply
                            0
                            • J Jon McKee

                              I'd also agree on "C# in a Nutshell" by Joseph and Ben Albahari. If you ever really want to take a deep dive into C# and the CLR I highly recommend "CLR via C#" by Jeffrey Richter. In the meantime though, the Microsoft Docs on C#[^] are quite good to start off with :thumbsup:

                              F Offline
                              F Offline
                              Fabio Franco
                              wrote on last edited by
                              #27

                              Jon McKee wrote:

                              "CLR via C#"

                              This book is awesome. Must read for an in depth understanding of C# on top of .net.

                              To alcohol! The cause of, and solution to, all of life's problems - Homer Simpson ---- Our heads are round so our thoughts can change direction - Francis Picabia

                              D 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!

                                D Offline
                                D Offline
                                dandy72
                                wrote on last edited by
                                #28

                                I agree with using a var for what clearly should be an int. Or should it be a long? Or a 64-bit unsigned int? As for your 'p' example--it all depends on what you do with it next. If you just need to hang on to it so you can eventually return it from the current function, or to pass it as a param to another function, then under those circumstances I'd say the exact type shouldn't matter to a reader.

                                1 Reply Last reply
                                0
                                • OriginalGriffO OriginalGriff

                                  I completely agree on the syntax - that's why I use the methods instead - but Linq does have some advantages over the "loads of loops" approach! :-D

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

                                  M Offline
                                  M Offline
                                  Member 13046479
                                  wrote on last edited by
                                  #29

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

                                  J 1 Reply Last reply
                                  0
                                  • G Gary Wheeler

                                    Pro C# 6.0 and the .NET 4.6 Platform[^] by Andrew Troelsen. I've not read this edition (I have the VS2008 version), but it was a very good introduction.

                                    Software Zen: delete this;

                                    C Offline
                                    C Offline
                                    Clinton Gallagher
                                    wrote on last edited by
                                    #30

                                    I agree Troelsen's book is very good BUT as a former instructor NOTHING beats a textbook with structured lessons. Deitel and Deitel are arguably the best textbook publishers and "C# A Programmer's Introduction" is what I would recommend to get started from scratch. Expensive but worth it if you are disciplined enough to do every excercise as if you were in school else a waste of money that will end up on the shelf next to Troelsen's "C# and the .NET Platform."

                                    Clinton Gallagher

                                    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:

                                      T Offline
                                      T Offline
                                      tchris
                                      wrote on last edited by
                                      #31

                                      This one helped me got off the ground running.

                                      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:

                                        T Offline
                                        T Offline
                                        tchris
                                        wrote on last edited by
                                        #32

                                        This one helped me get off the ground https://www.murach.com/shop/murach-s-c-2015-detail

                                        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:

                                          T Offline
                                          T Offline
                                          tchris
                                          wrote on last edited by
                                          #33

                                          Murach's C# 2015[^]

                                          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