Code Yarns ‍👨‍💻
Tech BlogPersonal Blog

.Net Book Zero

📅 2010-Oct-30 ⬩ ✍️ Ashwin Nanjappa ⬩ 🏷️ charles petzold, csharp, programming ⬩ 📚 Archive

 

Rating: 4/4 (The perfect introductory C# book for C and C++ programmers!)

I am most comfortable with C and C++, though it is mostly a love-hate relationship. C# is a modern programming language for the .Net platform and I have wanted to try it for sometime. I looked around for some good books and found most C# books to be horribly written. I mean, anyone can teach the keywords of the language and syntax. What one wants from a book is a deeper introduction. I finally found my match in .Net Book Zero by Charles Petzold. Petzold is a technical author who is legendary for his Programming Windows series of books. .Net Book Zero is his book for C and C++ programmers who want to learn C# and .Net.

Call me old fashioned, but I love it when the author says “Close your Visual Studio kid! Let me show you how to write and compile a C# program at the command-line using the C# compiler (csc.exe). Now, let us disassemble the program using the IL Disassembler (ildasm.exe) and examine the IL code the compiler produced for our program.”

I used version 1.1 of this book, which is updated only up to C# 2.0. I did not mind this, so the book was perfect for my needs! Petzold quickly glosses over features which work the same in C# as in C and C++. Instead he focuses on features that are new or work in subtly different ways. I especially loved the depth with which value types (allocated on the stack) and reference types (allocated on the managed heap) are covered all throughout the book. It is this kind of writing that enables a C/C++ programmer to come through this 250+ page book with an in-depth knowledge of how the gears crank underneath C#. The one thing that is missing in this book is a good index. I cannot think of an introductory C# book that is better suited for the C/C++ audience. Highly recommended. Petzold made a mistake sharing the book for free ;-)

The book has some spelling mistakes, I have compiled the errata here.


© 2022 Ashwin Nanjappa • All writing under CC BY-SA license • 🐘 @codeyarns@hachyderm.io📧