Enter your mobile number below and we'll send you a link to download the free Kindle App. Then you can start reading Kindle books on your smartphone, tablet, or computer - no Kindle device required.
Getting the download link through email is temporarily not available. Please check back later.

  • Apple
  • Android
  • Windows Phone
  • Android

To get the free app, enter your mobile phone number.

Kindle Price: £17.59

Save £7.40 (30%)

includes VAT*
* Unlike print books, digital books are subject to VAT.

These promotions will be applied to this item:

Some promotions may be combined; others are not eligible to be combined with other offers. For details, please see the Terms & Conditions associated with these promotions.

Deliver to your Kindle or other device

Deliver to your Kindle or other device

C# 4.0 How-To by [Watson, Ben]
Kindle App Ad

C# 4.0 How-To Kindle Edition

5.0 out of 5 stars 4 customer reviews

See all formats and editions Hide other formats and editions
Amazon Price
New from Used from
Kindle Edition
"Please retry"

Length: 672 pages Enhanced Typesetting: Enabled Page Flip: Enabled
  • Due to its large file size, this book may take longer to download

Kindle Books from 99p
Load up your Kindle library before your next holiday -- browse over 500 Kindle Books on sale from 99p until 31 August, 2016. Shop now

Product Description

From the Back Cover

Real Solutions for C# 4.0 Programmers


Need fast, robust, efficient code solutions for Microsoft C# 4.0? This book delivers exactly what you’re looking for. You’ll find more than 200 solutions, best-practice techniques, and tested code samples for everything from classes to exceptions, networking to XML, LINQ to Silverlight. Completely up-to-date, this book fully reflects major language enhancements introduced with the new C# 4.0 and .NET 4.0. When time is of the essence, turn here first: Get answers you can trust and code you can use, right now!


Beginning with the language essentials and moving on to solving common problems using the .NET Framework, C# 4.0 How-To addresses a wide range of general programming problems and algorithms. Along the way is clear, concise coverage of a broad spectrum of C# techniques that will help developers of all levels become more proficient with C# and the most popular .NET tools.


Fast, Reliable, and Easy to Use!

  • Write more elegant, efficient, and reusable code
  • Take advantage of real-world tips and best-practices advice
  • Create more effective classes, interfaces, and types
  • Master powerful data handling techniques using collections, serialization, databases, and XML
  • Implement more effective user interfaces with both WPF and WinForms
  • Construct Web-based and media-rich applications with ASP.NET and Silverlight
  • Make the most of delegates, events, and anonymous methods
  • Leverage advanced C# features ranging from reflection to asynchronous programming
  • Harness the power of regular expressions
  • Interact effectively with Windows and underlying hardware
  • Master the best reusable patterns for designing complex programs


About the Author

Ben Watson, a software engineer on Microsoft’s Bing team, helps design and implement massively scalable distributed systems and other internals for the Bing search engine. Before joining Microsoft he served as a lead developer for GeoEye, a top provider of satellite imagery. He blogs at PhilosophicalGeek.com, where he has presented many popular coding tutorials in C# and C++.

Product details

  • Format: Kindle Edition
  • File Size: 49367 KB
  • Print Length: 672 pages
  • Simultaneous Device Usage: Up to 5 simultaneous devices, per publisher limits
  • Publisher: Sams Publishing; 1 edition (1 Mar. 2010)
  • Sold by: Amazon Media EU S.à r.l.
  • Language: English
  • Text-to-Speech: Enabled
  • X-Ray:
  • Word Wise: Not Enabled
  • Enhanced Typesetting: Enabled
  • Average Customer Review: 5.0 out of 5 stars 4 customer reviews
  • Amazon Bestsellers Rank: #688,086 Paid in Kindle Store (See Top 100 Paid in Kindle Store)
  •  Would you like to give feedback on images or tell us about a lower price?

What Other Items Do Customers Buy After Viewing This Item?

Customer Reviews

5.0 out of 5 stars
5 star
4 star
3 star
2 star
1 star
See all 4 customer reviews
Share your thoughts with other customers

Top Customer Reviews

Format: Paperback
Moving back into the C# world from PHP, I was looking for a "PHP Cookbook" style book. C# 4.0 How To fits the bill perfectly. I read it on the kindle first (not at all recommended, since many of the code examples are unreadable), and have since purchased the hardcover. Although it's still in good condition at the moment, it will be dog-eared and back broken before the year is out. Highly recommended for quickly finding correct answers to your daily questions. Also highly recommended as a bi-monthly read to keep you on your toes.

You may think that Google and StackOverflow make books like this superfluous, but I can assure you that that would be a mistaken assumption. The web is great for finding workable answers to a lot of questions, but this books has the correct answers, plus asks a lot of question that you didn't even know you should be asking.

Don't let the ugly cover fool ya... this book is a gem.
Comment 2 people found this helpful. Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback.
Sorry, we failed to record your vote. Please try again
Report abuse
Format: Paperback
If you're looking for a 'cookbook' approach to learning C# 4.0, this book provides excellent set of lessons broken down into carefully selected "how-to" problems with detailed solutions. It really transforms the otherwise monotonous reading of C# textbooks to joyful learning through chunks of problem solving.

Based on 27 chapters, and on average about 10 how-to problems per chapter, the book covers important programming concepts encountered in C# 4.0. For a vast field of C# programming language, in my opinion the "how-to" approach taken by this book provides a more effective way of imparting the programming concepts with optimum learning time and print space. Needless to say, the author deserves credit for an effective method he has chosen for otherwise very challenging subject area to cover as conventional textbook.

Code samples used in the book (for all 27 chapters + Appendix) can be downloaded from a website as per the instruction given on page 3.

If you are interested in learning C# 4.0, consider this book your in-house virtual tutor. Highly recommended.
Comment Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback.
Sorry, we failed to record your vote. Please try again
Report abuse
Format: Paperback Verified Purchase
This is a fantasic great book for all those times you have wanted to do something in c# and had to take a look on google as to how to perform a task. It contains many solutions and in everyday areas that youre going to encounter as a developer wush cas exceptions, the language itself, threading, Linq, networking, generics and much more

Its easy to find the bit youre after and you done need to read pages and pages of text. Its a simple case of find the bit you want and read it. Nice and simple and it works.

Bad points - some of the examples show and too easy for "real world scenarios" but I would argue that its better than you know how to start in some area thats new to you with some assistance from this book and then go off and do some research on your own in that area.

This is definatly one of those handy refernce books that you will need time and time again.
Comment One person found this helpful. Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback.
Sorry, we failed to record your vote. Please try again
Report abuse
Format: Paperback Verified Purchase
Its not a Beginners book as such - that is almost a put down. It has short concise 'How Tos' for almost everything you can think of. The code download at informit.com is real handy and allows you to build up your own class libs easily. The Kindel and PDF versions of this book is one to have on your laptop/phone, tho the PDF is easier. Its not all .net4 eg you can use examples for 3.5, it shows you the way.
This assumes you know C# but just want a cookbook for the 'best way' of doing something. Its almost something that a lead developer would memorise, or you get for your team so they dont bug you.
Comment Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback.
Sorry, we failed to record your vote. Please try again
Report abuse

Most Helpful Customer Reviews on Amazon.com (beta)

Amazon.com: HASH(0x8f0dc87c) out of 5 stars 17 reviews
36 of 36 people found the following review helpful
HASH(0x8f0f1414) out of 5 stars Useful .NET Framework code algorithms in C# for experienced developers 16 April 2010
By Michael Keller - Published on Amazon.com
Format: Paperback
This book's title does not quite match its content but the book's introduction does indicate this. This is primarily a very good book of code and code algorithms in the .NET framework using C#. That being said the book does cover the changes made to the .NET 4.0 framework and to C# 4.0.

The code is very well written--it is beautiful well structured communicative code. The code in the book is sparsely commented; it is so well-written that few comments are needed. As I have said, in many ways the book is a book of code algorithms, for example, in chapter 5 Convert Between Number Bases, Convert a Number to Bytes, Determine if an Integer is Even, Determine if a Number is Prime, Count the Number of 1 Bits etc. All these code examples are useful algorithms but have nothing to do with .NET Framework 4.0 or C# 4.0 per se.

Despite what the Introduction says this is decidedly not a book for beginners. While they may be able to find useful algorithms here and there the content of the book is way too terse for a beginner to follow and they should turn to other books for a more complete introduction to C#. Chapter 8 on regular expressions will only be useful to programmers that already have the basics of regular expressions well-understood otherwise even the first few code examples will leave them scratching their heads. This book does not do any hand-holding but rather shows you in very practical ways how to use the C# language and the .NET framework.

I loved the code examples using dynamic types as this was the best example I have yet seen of using them in a practical straight-forward way. The code is the book is not just useful and terse but it is also elegant. For example, the ternary operator is used multiple times in the CompressFile project in Chapter 11 producing really elegant concise and clear code.

The book, not the down-loadable code, has a few errors and code bugs but very few, for example:
Pg 16 code won't compile since _x is private and therefore not accessible to the derived class
Pg 17 line Console.WriteLine(d.MyProperty().ToString()); wont compile
Pg 17 code wont compile, class Derived not inheriting from Base class--missing : base
DoSomething method in class Derived needs to be marked override not virtual to eliminate compiler warning
Pg 65 example code given says, "Because ArgumentNullException is a type of ArgumentException, and ArgumentException is first in the catch list, it will be called." This is not true as the compiler is smart enough to recognize the problem and results in a compiler error and therefore the code will not even run.

I recommend this book for intermediate and advanced developers. Read the book and study the code examples and you will:
1) Learn the .NET Framework 4.0
2) Learn C# 4.0
3) Add to your inventory of useful code algorithms
4) Improve your written code by reading and studying the elegant code in this book.
10 of 11 people found the following review helpful
HASH(0x8f0f1468) out of 5 stars Very practical, great examples. 15 Mar. 2010
By J. Boal - Published on Amazon.com
Format: Paperback
This is a great how-to book for anyone needing to write code today in C#. It has so many great examples and code snips for really practical things that we all need to write day in and day out. There are not only great code examples, but also best-practices that have been adopted across the industry. Ben also discusses the why behind the best practices, and explains the benefits of the structure of the examples. From [...], WPF, WCF, LINQ, SQL databases, and Silverlight - all have relevant, complete examples of how to do practical things using these technologies. C# is a complex language, with many facets and aspects, all of which are covered with examples. The code samples are well-written and understandable, some get into advanced aspects of the topics they cover which really is of real value even to advanced developers. The user level is targeted for beginners and intermediate developers, and certainly it will be of real value to them too. This is one reference book I am keeping within arm's length of my keyboard...
7 of 7 people found the following review helpful
HASH(0x8f6ce1a4) out of 5 stars Hit the ground running. 16 April 2010
By Bill J. - Published on Amazon.com
Format: Paperback
This book is a twist on the C# Cookbook style of books only better. The examples are organized and tailored around implementation or solving problems instead of demonstrating theories. Descriptions are very brief, to the point and still effective. The book is also well indexed so you are able to isolate solutions quickly. This is really a gem feature well implemented; in the past I've seen well indexed books with average solutions used time and time again over books that demonstrated technical competence and yet are difficult to sift through. I have not tried any of the solutions in this book yet, but they look really good so far. I think this will be a go to book for me in the near future.

This book is not for the absolute beginner. You will need some context. If needed, do some tutorial videos, write some code or something before jumping into this one.
3 of 3 people found the following review helpful
HASH(0x8f0f16f0) out of 5 stars Quick and To The Point 4 Nov. 2010
By W. Wallace - Published on Amazon.com
Format: Paperback
I have recently started to attempt to learn more about the latest .NET 4.0 release, primarily where C# is concerned. I have been primarily a Java developer, but have dabbled in C# from time to time so I like to see some of the new things the language has added. Luckily, I won a contest on Ben Watson's blog for a free copy of his book, C# 4.0 How-To. I received the book a week ago and have slowly been making my way through it.

C# 4.0 How-To is a book is written in the cookbook style. It provides numerous examples of how to do the most basic things using the framework. It has examples on WCF, WPF, Silverlight, and even includes a simple example on using ASP.NET MVC. I have really enjoyed it so far. It is not a book for someone just getting started with programming, but is the perfect book for someone like me who has experience with modern OO languages, but does not know the ins and outs of the .NET framework. I am pretty sure that as I get started with some personal projects I have in mind, this book will sit by my side the entire time.
3 of 3 people found the following review helpful
HASH(0x8f0f1930) out of 5 stars C# 4.0 HOW-TO: This is the Book to have! 16 Feb. 2011
By Chuck Northrup - Published on Amazon.com
Format: Paperback
This book is worth its weight in gold! I say this in all sincerity. I paid $39.99 (Full Price) for this book. However, after having used it, I now know I would have paid $79.99 for it. Whereas, some have said this book is "not for the beginner", I strongly disagree. This book is exactly for the beginner who learns from example. It simply shows you "How-To".

As a C#.NET Developer, I reference this book often for quick, accurate and up-to-date examples of C# techniques used in small business and corporate applications I create. I highly recommend this book!
Were these reviews helpful? Let us know
click to open popover