Amazon.com Customer Reviews
Excellent C# 2.0 Resource - Review written on July 12, 2007
Rating: 5 out of 5
3 customers found this review helpful.
The C# Cookbook, Second Edition has been updated and revised for C# 2.0 and version 2.0 of the .NET framework, and despite the fact that version 3.5 of the .NET framework is imminent, it remains a must have book to have on hand. It is essentially a collection of examples showing how to solve specific programming problems (some of which you might not have even realised you have, such as boxing/unboxing and efficient string handling, to name just a few...)
The C# Cookbook has over 1100 pages and is arranged into 20 chapters, each of which focuses on a particular area in C#. Despite its size it is not daunting to read. Here are the topics covered:
1. Numbers and Enumerations
2. Strings and Characters
3. Classes & Structures
4. Generics
5. Collections
6. Iterators and Partial Types
7. Exception Handling
8. Diagnostics
9. Delegates, Events and Anonymous methods
10. Regular Expressions
11. Data Structures and Algorithms
12. Filesystem I/O
13. Reflection
14. Web
15. XML
16. Networking
17. Security
18. Threading and Synchronisation
19. Unsafe Code
20. Toolbox
This book is in O'Reilly's `cookbook' series Problem-Solution-Discussion format, and like other books in the series can either be read from cover to cover, or be used as a reference to shed light on a particular problem. Each `recipe' starts with a description of the problem, followed by a complete, documented code sample showing you how to solve it, along with a detailed discussion of how and why it works, and any drawbacks. This format can also serve as an excellent way of mastering aspects of C#.
Like the other O'Reilly cookbooks, this book manages to strike a perfect balance between reference and instruction on real problems developers encounter every day. Hats off to Jay and Stephen for creating such a useful resource.
If you are a developer who writes C# code for a living, I would be surprised if you do not find something useful the first time you pick this book up. If you are thinking of buying just one book on C# 2.0, make it this one. Highly recommended for beginners and experts alike.
[...]
COOKING WITH C#!! - Review written on August 13, 2006
Rating: 5 out of 5
7 customers found this review helpful, 2 did not.
Are you an experienced C# or .NET developer? If you are, then this book is for you! Authors Jay Hilyard and Stephen Teilhet, have done an outstanding job of writing a second edition of a book that was put together based on programming problems that the authors ran into when they were first learning C# as well as during their continued use of it.
Hilyard and Teilhet, begin by focusing on the numeric and enumeration data types used in C# code. Then, the authors cover both the String and Char data types. Next, they cover a wide range of recipes from design patterns to converting a class to interoperating with COM. The authors then focus on the new generics capacity of C#, which allows you have code operate uniformly on values of different types. They continue by examining recipes that make use of collections. Then, the authors use two new features of C# to solve very different programming problems. Next, they show you how to implement exception handling in your application. The authors then explore recipes that use data types that fall under the System.Diagnostics namespace. They continue by showing you how delegates, events, and anonymous methods can be used in your applications. They also cover a very useful set of classes that are used to run regular expressions against strings. Then the authors show you how to implement certain data structures and algorithms that are not in the FCL. Next, they deal with filesystem interactions in four distinct ways. The authors show you ways to use the built-in assembly inspection system provided by the .NET Framework to determine what types, interfaces, and methods are implemented within an assembly and how to access them in a late-bound fashion. Then, they cover accessing a web site and its content as well as programmatically determining web site configuration. Next, the authors explore some of the uses for XML. The authors then explore the connectivity options provided by the .NET Framework. They continue by exploring areas such as controlling access to types, encryption and decryption, random numbers, securely storing data, and using programmatic and declarative security. Then, the authors address the subject of using multiple threads of execution in a .NET program. Next, they discuss how C# allows you to step outside of the safe environment of managed code and write code that is considered unsafe by the .NET Framework. Finally, they help you how to determine locations of system resources, sending e-mail, and working with services.
This most excellent book is laid out with respect to the types of problems you will solve as you progress through your life as a C# programmer. More importantly, nearly every recipe contained in this book shows you how to solve a specific problem.
Fine Recipes for "Well Done" Code - Review written on February 20, 2006
Rating: 4 out of 5
8 customers found this review helpful.
I use O'Reilly's cookbooks for two purposes; first to find out ways to do task at hand in a better way and second to explore the feature set a programming language has to offer. From a developer's mindset an annotated reference to a programming language may not be much helpful as compared to seeing code-in-action. I can read all about observer design pattern and the file system watcher class but having an code segment showing the implementation is priceless; so is "Replacing the stack and queue with their generic counter parts", spiffy eh?
The book is well done and authors have covered a whole lot in over 1100 pages including threading, unsafe code, XML, networking, delegates and regular expression recipes. My favorite recipe as a language features creep would be 9.15, "Using Closures in C#". (Closure is a function that refers to free variables in its lexical context).
Having said that, I'm missing things like SOAP extensions, serialization and small nitpick http request / response spoofing techniques in there which us developers do much often and hence the 4 stars. But if you are working with C# and want something more than a Google search (for instance knowing that secure strings won't work unless you have Win2K sp3 or higher), buying this book would be a wise thing to do.
Outstanding C# Reference Book - Review written on September 22, 2005
Rating: 5 out of 5
19 customers found this review helpful, 1 did not.
This is exactly what a cookbook should be, it's as simple as that. If you are a C# programmer you would be making a mistake to not have a copy of this fantastic reference book by your side. For any book to be named a "cookbook" I would expect a myriad of problems to be tackled, and a variety of subjects. I wouldn't want a thin reference manual, yet I wouldn't want problems to go on for pages and pages and pages. Ideally an examination of a wide variety of issues with concise, straightforward solutions is optimal, and that's exactly what this book provides.
Topics Covered:
01. Number-Related Tips & Tricks
02. String Abilities
03. Working With Classes & Structures
04. Enumerations
05. Exception Handling
06. A look at Diagnostic Tools
07. Working with Delegates & Events
08. Regular Expressions
09. Collections
10. Data Structures in C#
11. Filesystems in C#
12. Reflection
13. Networking code and issues
14. Security Matters
15. Working With Threads
16. A Look At Unsafe Code
17. XML Analysis
From that list of topics, is there any subject that a C# developer doesn't run into some issue with at some point?
I'm trying to write a longer, drawn out review about why you should pick up this book, but it's really hard to do so because I instantly found this book so useful.
Save yourself the time and aggravation and pick up "C# Cookbook" by Stephen Teilhet and Jay Jilyard, I can assure you that you will not regret it.
***** HIGHLY RECOMMENDED
Decent, but flawed - Review written on July 30, 2004
Rating: 3 out of 5
Cookbooks are generally a good reference to have, especially those for a relatively young language, such as C#. They are time savers--I can figure out the answer to a problem I'm having myself, but if I can pop open a book and see the solution immediately, so much the better.
I am pleased with the format of the book and the depth of detail; each problem is analyzed, a solution is set forth, and discussed. Unfortunately, some of the solutions are inefficient, and worse, incorrect.
Their discussion on bitwise operations for problem 4.6 is confusing and inaccurate at times, and their solution for the fourth test is wrong.
I have found some condition tests which are unnecessary (such as in 8.10). They don't make the functions wrong, just less efficient. A little bit of analysis would have removed them, and made the code look a little less lazy.
To be fair, I just checked the website for this book, and they do recognize that there is a problem with the 4.6 code. However, they then go on to restate the problem. The original problem says "return true if the language variable matches these two languages exactly"; they have restated it as "return true if the language variable contains either or both of these two languages, but no other". They then misstate the problem in a "what if" scenario (that the test should return true if all of the languages are in the test variable), but fix the test by adding an extra decision (checking if the test variable is 0). It works, but it's just not the way I would do it.
4.6 is the last problem with errata, and I suspect that's only because people haven't progressed far enough into the book to reveal more.
Three stars for now, as I'm going to give the book a thorough go-over. Get it if you really need it, but be aware that you may need to debug the code you're buying it for.
Great addition to your C# library - Review written on April 22, 2004
Rating: 4 out of 5
26 customers found this review helpful, 2 did not.
This is a really cool book. Skim through it, and you'll see that all the hard stuff you want to do in .NET or C# are all in one book. You'll find some general computer science algorithms implemented in C#, and you'll find other things that are simply C# specific. I'd highly recommend any professional C# programmer adding this to their reference library.
The book contains a chapter for each of various C# objects. Beginning with numbers, the book continues through strings, classes, delegates, collections, I/O, threading, and XML to name a few. Some examples of "recipes" you'll find include how to improve string builder performance, issues with bit-shifting, adding notification callbacks, rolling back object changes, determining whether a process has stopped responding, and validating XML.
Like many of O'Reilly's other "cookbook" reference books, this book can be read from cover to cover, but it's really designed like a cookbook. The idea is to flip thorough each recipe in a specific section until you find one that fits what you're trying to do. While reading through this book, I came across five or six answers to various different problems I'm currently addressing in my own C# work. This is a definite must-have to your library.
A Great Reference - Review written on February 26, 2004
Rating: 5 out of 5
3 customers found this review helpful, 14 did not.
I found this book to be very usable. As the author of the ASP.NET Developer's Cookbook, which used the same format, I found this book to be very easy to pick up and browse for useful topics. I found quite a few. I've posted a detailed review on my website, AspAlliance.com, here:
http://aspalliance.com/381