Here I have put together a list of C# books that I find worth reading if you are getting into programming and your language of choice is C#. The list contains C# specific books but I have also included some general programming books. Such as books on Object Oriented Programming, design patterns, architecture or general knowledge in the world of programming. These can be seen as supplementary as much in programming is the same for most languages.
You will often find it easier to learn a new language if you have another purpose than just "learning the language". I would recommend that you find a book which supports what you want to code. For example if you wish to work with microservices buy a book on microservices. If you wish to work with games I would suggest getting a book on developing games (using unity?). You can then supply that with a book on C#. Here is my list, it is in no particular order.
Head First C#
Authors: Jennifer Greene and Andrew Stellman
I added this book as a great beginners book, as with all head first books they are a good starting point. It has some really good and simple explanations, as well as having a sense of humor. It is also highly visual which helps you get a feeling of what you are doing. The tutorials are also very engaging but sticking to the basics. It will teach you the fundamentals of the language and the available libraries.
If you are a beginner I would start here.
C# 9 and .NET 5 – Modern Cross-Platform Development
Author: Mark Price
Mark Price has released multiple iterations of this book, which is also why it has made it to this list. He continuously keep this book updated to the newest .Net version and adds extra chapters. This is a great book if you wish to explore more than just C#, It will take you through the following and more:
- C# programming language
- .Net class libraries
- Entity Framework
- ASP.NET Core
- Blazor Server and Blazor WebAssembl
- ML.NET (machine learning)
The examples are in C# and Visual Studio Code is used as IDE, so this is a hands on book. This book will also prepare you for the unification of all the different frameworks into .Net 5, as it is updated to the newest version.
C# in depth
Author: Jon Skeet
Have you been a contributor on stack overflow? Then you probably know who Jon Skeet is. He is the person with the most Reputation on stackoverflow (the points you get for great answers and questions). He is also the author of C# in depth. This is another book targeting specifically C#.
This book however, is not for beginners. It is for those who know about the basics of C# or has been working in a similar language. It goes much in depth on how C# works and is very detailed. If you have been working with C# for several years and want to go deeper you should read this book. It's many details are likely to surprise you!
The Pragmatic Programmer: From Journeyman to Master
Author: Andrew (Andy) Hunt
Ah this book! I can hardly make a list of books without adding this to it. This is my favorite general book on software development. This is the first book on my list which is not specifically targeting C#. This book will be applicable no matter which language you are working with, it goes through a lot of the things you will have to deal with as a developer.
It gets around topics such as automation, Don't repeat yourself (DRY) and refactoring. Even experienced programmers might learn a thing or two from this book - or be reminded of a thing or two.
Test Driven Development by example
Author: Kent Beck
This book is also good for OOP development. Not only is it good if you are into Test Driven Development (TDD), but it also has some very good examples on how to refactor and structure your code. It goes through the iterations you do when you refactor - and by that you make your code more testable and readable. It has some great examples on how to approach refactoring. The book is written in Java but the examples are easily converted to C#. This book will also help you make your code more SOLID.
If you wish to go more into detail with refactoring you can also get the book "Refactoring" by Martin Fowler (and Kent Beck), however that is a harder book to get through and is also longer. I often get back to this book to look things up.
Head First Design Patterns
Authors: Eric Freeman and Elisabeth Robson
I actually first read this book when studying for my AP Graduate in Computer Science. At first I did not think much of it, other than it was funny. It was only much later (when I was a more experienced programmer) I actually got to like it. This book contains some very good drawings and presents the design patterns in an easy-to-understand way. It goes through the different design patterns and explains how and where they can be applied. As with all Head First books, this one also contains some great humor.
The examples are in Java, but can be easily translated to C# (The two languages are very much alike). Design patterns are still good to know these days. But avoid using them everywhere after you have read the book, they can easily overcomplicate simple code.
That is it!
That was my list, did I forget any? Let me know in the comments down below!