C# Cookbook, 2nd Edition (Cookbooks (O'Reilly))

C# Cookbook, 2nd Edition (Cookbooks (O'Reilly))
Authors
Jay Hilyard, Stephen Teilhet
ISBN
0596100639
Published
30 Jan 2006
Purchase online
amazon.com

The O'Reilly Cookbook series, with its to-the-point but illuminating coverage of programming subjects, meets the challenge of explaining how to write software as well as anything else on the market. When you're facing a coding problem--particularly in a language you're new to or haven't used in a while--and know there must be a proven way to solve it, the right Cookbook can often get you going in a hurry. C# Cookbook applies the formula to the language of Microsoft .

Page 2 of 2
  1. Editorial Reviews
  2. Customer Reviews

Customer Reviews

XPSD said
[Reviewed by XPSD member Steve Grubbs]

Summary

I wanted to check out a C# cookbook after developing in C# for almost a year. I figured I should get a basic understanding of the language and the .NET framework by using it for awhile before I buy such a book. That said, I wish I could go back in time and tell myself to get the C# Cookbook the day I started developing in C#.

Overall Review

I see two main criteria for reviewing a programming language cookbook.

1. The quality of each "recipe"
2. The recipes chosen for the book

The C# Cookbook handles each recipe very well, which we should definitely demand of a cookbook. It has a very simple 4-section format, Problem-Solution-Discussion-See Also. The problem is briefly stated first. The solution is almost entirely code samples, with minimal commentary. The discussion is usually short and sweet, with a few exceptions. The "see also" points to reference topics in the MSDN help, which is of questionable usefulness, since you can search the topics yourself; but, is short enough to skim over easily.

The recipes chosen for the C# Cookbook range from very useful to trivial. One of the trivial examples would be something like, converting degrees to radians. The only language specific feature here is Math.PI, which I don't think is worth the page it's printed on. What I found surprisingly useful were some code samples that I spent time coming up with on my own before reading this book, like a custom trace class that outputs in XML. Fortunately, most of the examples were in the useful category.

A few glaring topic omissions are remoting, ADO, and advanced object serialization.

Per-Chapter Review

* Numbers - somewhat trivial
* Strings and Characters - good introduction to the C# string
* Classes and Structures - good stuff on interfaces, casting, converting, COM interop
* Enumerations - simple, but short and useful
* Exception Handling - an underrated topic that I'm happy to see covered
* Diagnostics - a surprisingly useful set of tools to help with debugging
* Delegates and Events - very good intro for the new C# programmer
* Regular Expressions - very good intro for the new C# programmer
* Collections - a little simple, could have more useful samples
* Data Structures and Algorithms - simple, but good if more advanced types are required
* Filesystem I/O - very good examples of file I/O in C#
* Reflection - a necessary intro to reflection, but a bit simple
* Networking - biggest complaint: Why is there no remoting?
* Security - a good survey of various security issues in C#
* Threading - a good intro to threads and basic synchronization in C#
* Unsafe Code - I tore out and burned this section
* XML - good intro to reading/writing XML in C#

Booked said
This is a good intro book that eliminates the need for some of the first books I bought on C#. When compared to other "cookbooks", however, this book is incredibly weak (see: XSLT Cookbook, SQL Cookbook). If you have used C# for more than 6 months, you will know how to iterate over an array, to use String.IsNullOrEmpty, get the index of a value within a string, and use a generic arraylist. These are just some of the junior "recipes" you'll see in this book. The "recipes" just exercise the fundamentals (i.e. how to boil water) rather than how the fundamentals work together to solve complex problems in elegant ways. The easier the concept, the more information. There isn't really any analysis or best-practice justification present. I'd like to see some performance analysis of generics or at least some depth on partial methods. Nothing to see here for mid-level developers. Not written or organized poorly, just simple. If it were titled "Intro to C# by example", I'd give it a higher score.

B. Eisenhauer said
I'm an intermediate coder, familiar with programming and I have about 1.5 years programming C#. I've already used this book(C# Cookbook 2nd edition) to write C# code navigating in and around directories and files. The examples in the book regarding "Directory Info" and "File Info" were so clear and concise, I was able to complete my programming task with almost no lost time to the learning process. What I like most was that there was not one example, but many examples for the most used functionalities. This book has already paid for itself when I consider the time it saved me the first time I needed it!

Aseiu P. said
I came across a project that had to do with XML, and I came to love this book. It has a lot of suggestions that helped me jump start my project.

I wouldn't recommend this book to learn C#- (pick up John Sharp C# step by step for that.)

Chris Kissel said
If you are just coming into C# or have been doing it for a while - it doesn't matter - BUY THIS BOOK!!! Oreilly as we all know, makes very good tech/programming books and this one is one of the best I've had so far. This will be a book that will spend much less time on my shelf and much more time next to me on my desk.

You might also like...

Comments

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“Some people, when confronted with a problem, think "I know, I’ll use regular expressions." Now they have two problems.” - Jamie Zawinski