Buy new:
-23% $45.94
FREE delivery Saturday, July 27
Ships from: Amazon.com
Sold by: Amazon.com
$44.94 with 25 percent savings
List Price: $59.99

The List Price is the suggested retail price of a new product as provided by a manufacturer, supplier, or seller. Except for books, Amazon will display a List Price if the product was purchased by customers on Amazon or offered by other retailers at or above the List Price in at least the past 90 days. List prices may not necessarily reflect the product's prevailing market price.
Learn more
FREE pickup Monday, July 29
Or fastest pickup Thursday, July 25. Order within 22 hrs 24 mins

1.27 mi | ASHBURN 20147

How pickup works
Pick up from nearby pickup location
Step 1: Place Your Order
Select the “Pickup” option on the product page or during checkout.
Step 2: Receive Notification
Once your package is ready for pickup, you'll receive an email and app notification.
Step 3: Pick up
Bring your order ID or pickup code (if applicable) to your chosen pickup location to pick up your package.
Only 1 left in stock - order soon.
$$45.94 () Includes selected options. Includes initial monthly payment and selected options. Details
Price
Subtotal
$$45.94
Subtotal
Initial payment breakdown
Shipping cost, delivery date, and order total (including tax) shown at checkout.
Returns
Eligible for Return, Refund or Replacement within 30 days of receipt
Eligible for Return, Refund or Replacement within 30 days of receipt
Returnable Yes
Resolutions Eligible for refund or replacement
Return Window 30 days from delivery
Refund Timelines Typically, an advance refund will be issued within 24 hours of a drop-off or pick-up. For returns that require physical verification, refund issuance may take up to 30 days after drop-off or pick up. Where an advance refund is issued, we will re-charge your payment method if we do not receive the correct item in original condition. See details here.
Late fee A late fee of 20% of the item price will apply if you complete the drop off or pick up after the ‘Return By Date’.
Restocking fee A restocking fee may apply if the item is not returned in original condition and original packaging, or is damaged or missing parts for reasons not due to Amazon or seller error. See details here.
Returns
Eligible for Return, Refund or Replacement within 30 days of receipt
Returnable Yes
Resolutions Eligible for refund or replacement
Return Window 30 days from delivery
Refund Timelines Typically, an advance refund will be issued within 24 hours of a drop-off or pick-up. For returns that require physical verification, refund issuance may take up to 30 days after drop-off or pick up. Where an advance refund is issued, we will re-charge your payment method if we do not receive the correct item in original condition. See details here.
Late fee A late fee of 20% of the item price will apply if you complete the drop off or pick up after the ‘Return By Date’.
Restocking fee A restocking fee may apply if the item is not returned in original condition and original packaging, or is damaged or missing parts for reasons not due to Amazon or seller error. See details here.

Return instructions

Item must be in original condition and packaging along with tag, accessories, manuals, and inserts. Unlock any electronic device, delete your account and remove all personal information.
Read full return policy
Payment
Secure transaction
Your transaction is secure
We work hard to protect your security and privacy. Our payment security system encrypts your information during transmission. We don’t share your credit card details with third-party sellers, and we don’t sell your information to others. Learn more
Payment
Secure transaction
We work hard to protect your security and privacy. Our payment security system encrypts your information during transmission. We don’t share your credit card details with third-party sellers, and we don’t sell your information to others. Learn more
Kindle app logo image

Download the free Kindle app and start reading Kindle books instantly on your smartphone, tablet, or computer - no Kindle device required.

Read instantly on your browser with Kindle for Web.

Using your mobile phone camera - scan the code below and download the Kindle app.

QR code to download the Kindle App

Follow the author

Something went wrong. Please try your request again later.

Effective C#: 50 Specific Ways to Improve Your C# 1st Edition


{"desktop_buybox_group_1":[{"displayPrice":"$45.94","priceAmount":45.94,"currencySymbol":"$","integerValue":"45","decimalSeparator":".","fractionalValue":"94","symbolPosition":"left","hasSpace":false,"showFractionalPartIfEmpty":true,"offerListingId":"%2FQReScEKFJwheFbpPCPXuChS23CJBy5pADCrqB362l6PL22IcuQ11PZhfk2zTABb2UmSOtPg8f4sjZCPNNLnPm8LRw%2BIP9LkV%2BCzIWhkx%2B%2FKCdOTlZ1S7VI66In3cr0QpP0BZoRxVs8%3D","locale":"en-US","buyingOptionType":"NEW","aapiBuyingOptionIndex":0}, {"displayPrice":"$6.58","priceAmount":6.58,"currencySymbol":"$","integerValue":"6","decimalSeparator":".","fractionalValue":"58","symbolPosition":"left","hasSpace":false,"showFractionalPartIfEmpty":true,"offerListingId":"%2FQReScEKFJwheFbpPCPXuChS23CJBy5pFNtrO4R5A5U%2F0%2BZQv82DtsvN4xij9W5%2BZWC4yPRHXmfV5UtIApNcFxhYryUNuxLDIdwD8Dfcx%2F63Pd4Ey7s0XstjMrQ9fBsRE2Law79FzISyHK7iv9mVaY7zR8r3ZgMMysawiI%2BwjO4%3D","locale":"en-US","buyingOptionType":"USED","aapiBuyingOptionIndex":1}],"desktop_buybox_group_2":[{"displayPrice":"$44.94","priceAmount":44.94,"currencySymbol":"$","integerValue":"44","decimalSeparator":".","fractionalValue":"94","symbolPosition":"left","hasSpace":false,"showFractionalPartIfEmpty":true,"offerListingId":"%2FQReScEKFJwheFbpPCPXuChS23CJBy5pMtRCITLUmpcNk53lYfZzQWyr0HpjMR19lmAID%2Blji0NIabUouu6IvP4FpFshGg33x0%2BrHCDB1Utk44UpMwS1aVvz6crIYHkwoCt%2FTUc3NGIcM3%2FbjUx1JTZ0uHFtfhYxpvIquAH0oImpshWA3APW90bPS%2BfuM5L3","locale":"en-US","buyingOptionType":"PICKUP","aapiBuyingOptionIndex":2}]}

Purchase options and add-ons

C# is the premier language for .NET development, and is currently the fastestgrowing programming language. It is already being used by 29% of professionalprogrammers, with that percentage expected to continue increasing rapidly. It isstill a relatively new language, however, and developers are still looking forresources to enable them to use it better. Effective C# covers C# from apractical perspective, and provides insight into using the language moreefficiently. The reader will get information based on years of practical C#experience in real world settings. The format of the book is the same that hasproven immensely popular in other books in Scott Meyers' series. The authorhas a devoted following from his regular C# columns in Visual StudioMagazine. Every serious C# developer will keep this book close at hand, toreturn to again and again for advice.

Amazon First Reads | Editors' picks at exclusive prices

Editorial Reviews

From the Back Cover

"This book really demonstrates Bill's strengths as a writer and programmer. In a very short amount of time, he is able to present an issue, fix it and conclude it; each chapter is tight, succinct, and to the point."

—Josh Holmes, Independent Contractor

"The book provides a good introduction to the C# language elements from a pragmatic point of view, identifying best practices along the way, and following a clear and logical progression from the basic syntax to creating components to improving your code writing skills. Since each topic is covered in short entries, it is very easy to read and you'll quickly realize the benefits of the book."

—Tomas Restrepo, Microsoft MVP

"The book covers the basics well, especially with respect to the decisions needed when deriving classes from System.Object. It is easy to read with examples that are clear, concise and solid. I think it will bring good value to most readers."

—Rob Steel, Central Region Integration COE & Lead Architect, Microsoft

"Effective C# provides the C# developer with the tools they need to rapidly grow their experience in Visual C# 2003 while also providing insight into the many improvements to the language that will be hitting a desktop near you in the form of Visual C# 2005."

—Doug Holland, Precision Objects

"Part of the point of the .NET Framework—and the C# Language, in particular—is to let the developer focus solving customer problems and deliver product, rather than spending hours (or even weeks) writing plumbing code. Bill Wagner's Effective C#, not only shows you what's going on behind the scenes, but shows you how to take advantage of particular C# code constructs. Written in a dispassionate style that focuses on the facts—and just the facts—of writing effective C# code, Wagner's book drills down into practices that will let you write C# applications and components that are easier to maintain as well as faster to run. I'm recommending Effective C# to all students of my .NET BootCamp and other C#-related courses."

—Richard Hale Shaw, www.RichardHaleShawGroup.com

C#'s resemblances to C++, Java, and C make it easier to learn, but there's a downside: C# programmers often continue to use older techniques when far better alternatives are available. In Effective C#, respected .NET expert Bill Wagner identifies fifty ways you can start leveraging the full power of C# in order to write faster, more efficient, and more reliable software.

Effective C# follows the format that made Effective C++ (Addison-Wesley, 1998) and Effective Java (Addison-Wesley, 2001) indispensable to hundreds of thousands of developers: clear, practical explanations, expert tips, and plenty of realistic code examples. Drawing on his unsurpassed C# experience, Wagner addresses everything from value types to assemblies, exceptions to reflection. Along the way, he shows exactly how to avoid dozens of common C# performance and reliability pitfalls. You'll learn how to:

  • Use both types of C# constants for efficiency and maintainability, see item 2

  • Use immutable data types to eliminate unnecessary error checking, see item 7

  • Avoid the C# function that'll practically always get you in trouble, see item 10

  • Minimize garbage collection, boxing, and unboxing, see items 16 and 17

  • Take full advantage of interfaces and delegates, see items 19 though 22

  • Create CLS compliant assemblies that use noncompliant C# language features, see item 30

  • Improve reliability and maintainability by creating small, cohesive assemblies, see item 32

  • Leverage the full power of .NET's runtime diagnostics, see item 36

  • Know when—and when not—to use reflection, see items 42 and 43

  • Preview the major enhancements in C# 2.0, see item 49

  • You're already a successful C# programmer—this book can help you become an outstanding one.

Bill Wagner is co-founder of and .NET consultant for SRT Solutions. A nationally recognized independent expert on .NET, he has been a regular contributor to ASP.NET Pro Magazine, Visual Studio Magazine, and the .NET Insight newsletter. In addition to being a Microsoft Regional Director, he is also active in the Southeast Michigan .NET User Group and the Ann Arbor Computing Society. He is author of The C# Core Language Little Black Book (The Coriolis Group, 2002).


© Copyright Pearson Education. All rights reserved.

About the Author

Bill Wagner is co-founder of and .NET consultant for SRT Solutions.

Product details

  • Publisher ‏ : ‎ Addison-Wesley Professional; 1st edition (December 3, 2004)
  • Language ‏ : ‎ English
  • Paperback ‏ : ‎ 328 pages
  • ISBN-10 ‏ : ‎ 0321245660
  • ISBN-13 ‏ : ‎ 978-0321245663
  • Item Weight ‏ : ‎ 1.46 pounds
  • Dimensions ‏ : ‎ 6.93 x 0.74 x 9.13 inches
  • Customer Reviews:

About the author

Follow authors to get new release updates, plus improved recommendations.
Bill Wagner
Brief content visible, double tap to read full content.
Full content visible, double tap to read brief content.

Bill has spent his entire career in the software industry, spanning both technical and business roles. He spent eight years as a self-employed consultant before co-founding SRT Solutions with Dianne Marsh. Over the past decade they’ve grown SRT Solutions into a premier software development company, amassing 4 FastTrack awards (2011, 2010, 2008, 2007), the Michigan 50 Companies to Watch award (2011), and making the Inc 500/5000 list (2011 and 2012). Bill was also awarded Automation Alley’s Emerging Technology Leader award in 2011.

His technical time is spent between curly braces, primarily with C#. He’s the author of the best selling “Effective C#”, now in its second edition, and “More Effective C#”. His articles have appeared in MSDN Magazine, the C# Developer Center, Visual C++ Developer’s Journal, Visual Studio Magazine, ASP.NET Pro, .NET Developer’s Journal and more. He’s written hundreds of technical articles for software developers. He actively blogs about technical and business topics. Bill is also a regional director for Microsoft.

In addition to his business and technical accomplishments, Bill is an active community participant. He volunteers as a math tutor for the Manchester, Mich. schools, where he works to inspire high schoolers to consider a technical career.

He received his B.S. in Computer Science from the College of Engineering at the University of Illinois at Urbana Champaign.

Customer reviews

4.2 out of 5 stars
4.2 out of 5
34 global ratings

Customers say

Customers find the information in the book good and the format lends itself well to quick reading sessions that stick in their minds.

AI-generated from the text of customer reviews

Select to learn more
3 customers mention "Content"3 positive0 negative

Customers find the information in the book good and a great resource for getting a first glimpse at advanced topics.

"...This book is a great resource for getting that first glimpse to advanced topics that every pro should strive for...." Read more

"...Maybe I'm just biased.Like I said,the information has been good...." Read more

"I found this book to contain very useful technical information...." Read more

3 customers mention "Readability"3 positive0 negative

Customers find the book very well suited for quick reading sessions that stick in their minds. They also say C# is pretty easy to get up to speed with coming from a C/C++ background.

"While C# is pretty easy to get up to speed with coming from a C/C++ background, the similarities can lead to costly blunders!..." Read more

"This is really a useful book... topics are only a few pages long and allow you to pick and choose what is immediately relevant to you and your..." Read more

"Great book..." Read more

Top reviews from the United States

Reviewed in the United States on June 10, 2008
While C# is pretty easy to get up to speed with coming from a C/C++ background, the similarities can lead to costly blunders! .Net/C# is a "real" language and as such deserves the respect of any self-proclaimed professional. This book is a great resource for getting that first glimpse to advanced topics that every pro should strive for. It's an easy read and the format (recipe) lends itself very well to quick reading sessions that stick in your mind. Your coding style will invariably change for the best upon closing this book. Simply stated this book should be mandatory reading for anyone joining a .Net project but coming from a traditional language (C/C++).
2 people found this helpful
Report
Reviewed in the United States on August 5, 2016
Coming from a C++ background, I see the words "Effective C#" and it conjures up the old warm familiar book "Effective C++". Even Scott Meyers name is associated as a "Consulting Editor". I think this book may be a trap for C++ developers like myself. While there is some good content in this book (and I haven't even finished a third of it), the items are not nearly as polished as the "Effective C++" book series. Maybe I'm just biased.

Like I said,the information has been good. Most of the first items revolve around distinguishing between behavior driven code vs data. It's a cool distinction and it's definitely been an eye opener. They cover cool things like what the differences in the MSIL look like (okay, I admittedly added a star after really rethinking this).

I think the book would have been better if there were some syntax highlighting in the examples. The examples in this book are way too similar between each other! It would be helpful if the authors would have put in some special coloring between examples to show what has changed OR what is really important to take away from the example! Instead it forced me to go through and really pick at the examples.

Overall I liked the book. I picked it up used, not sure if I would buy it new.
One person found this helpful
Report
Reviewed in the United States on December 29, 2009
As a manager, I look for books that can help me but also help my team. This book did both. It is the C# version of the effective C++ books.

To me it is a must read for engineers writing/reviewing code in C#.

The only problem with it is that the language is a bit of a moving target so the most effective ways to use C# is changing. To me, instead of having an effective C# book and a more effective C# book they should have had just a second edition of the first. This probably is not likely to be solved as I imagine many will be just digesting C# 3.0 with 4.0 looming on the horizon. This, however, is beyond the authors control.
3 people found this helpful
Report
Reviewed in the United States on August 1, 2005
I found this book to contain very useful technical information. I dropped it to three stars because the spelling and grammar are so bad that they interfere with reading the book. This book is peppered with pairs of words not separated by a blank, with partial sentences that are obvious bad edits, and with several unreadable sentences. When the reader has to stop to figure out what the text is badly trying to say, the result is a break in the flow of the book.
8 people found this helpful
Report
Reviewed in the United States on September 12, 2009
If want to employ and understand the reason behind best practices in C# development, then this book and it's sequel  More Effective C#: 50 Specific Ways to Improve Your C#  will prove invaluable.

I'm taking it slow, reading one tip a day and reviewing the title of previously read tips each day in hopes to make these "Specific Ways" part of my nature as a C# developer. Several of them, such as "Prefer Properties to Accessible Members" were already apart of my normal practice, but others such as benefits of preferring "Conditional Attributes Instead of #if" were a surprise :-)

Also in the process of reading 
C# in Depth: What you need to master C# 2 and 3  and highly recommend it as well!... must haves for developers who strive to be experts at their craft.
3 people found this helpful
Report
Reviewed in the United States on March 15, 2005
I found alot of very valuable information in this book in advanced topics as well as a good review of basic C# and CLR topics.

Numerous typos, one every few pages, including the chapter heading for Item 8, were distracting. Some obvious factual errors, like page 63 and page 65 contradicting each other, made me question the accuracy all the content.
11 people found this helpful
Report

Top reviews from other countries

John Holcroft
5.0 out of 5 stars Another quality 'Effective' book
Reviewed in the United Kingdom on November 25, 2005
Another good book in the Effective series. Though if like me you have read Effective Java and have come from a Java background then you will probably have seen variations on the same items before. For instance this book has its own C# slant on the equals contract and hash codes that many Java programmers will have seen before. The items are still worth reading, as though the general theory may be known, the C# specifics are new.
This book is very open to people from a wide range of programming backgrounds, but a number of items do seem to be based on beating old style techniques out of Windows C++ programmers. If you are an old Windows C++ programmers it may seem that this book was written just for you.

My main criticism of this book is that I thought it had a tendency to describe items in an overly long and complicated way. But this is just a style issue and doesn't detract too much from the content. The things I loved the most were the debunking of common myths, such as 'avoid foreach' and 'avoid DataSets'. And my favourite item was a good example of how to program custom attributes to make reflection simpler and easier. This was a great example of attributes and a valid use of reflection and was the prefect precursor to the item 'Don't overuse reflection'.
Like all the 'Effective' books before it this is one to read once to get the general understanding, then to leave on your desk to reference again and again when the items become relevant to what you are doing at that moment.
14 people found this helpful
Report
HW
5.0 out of 5 stars Ein angehender Klassiker für die C Sharp Programmierung
Reviewed in Germany on March 4, 2005
Ein Kollege von mir brachte es sehr gut auf den Punkt. Man sollte nicht professionell in C# programmieren, bevor man dieses Buch gelesen hat. Durchaus auf einer Ebene mit den Klassikern von Scott Myers zu C++, Myers ist ja auch der Herausgeber bei diesem Buch.
2 people found this helpful
Report
Hans-Juergen Philippi
4.0 out of 5 stars Eine Heizdecke verkaufen
Reviewed in Germany on January 6, 2008
Bei den sogenannten "Kaffeefahrten" -neuerdings auch in den TV Shopping Kanälen- werden leichtgläubigen Kunden, häufig Senioren, hoffnungslos überteuerte Waren angedreht. Zum rhetorischen Repertoire der Verkäufer gehören endlose Wiederholungen und Bekräftigungen, wie toll das angebotene Produkt und wie einzigartig diese Kaufgelegenheit sei. Doch was hat das mit diesem Buch zu tun?
Nun, bei "Effective C#" kam ich mir auch ein bisschen vor wie auf einer Kaffeefahrt...

Bill Wagner hat hier de facto ein Bündel guter Tipps und Best Practises für den fortgeschrittenen C# Entwickler geschnürt. Zu allen Punkten finden sich Erläuterungen, warum in den Augen des Autors etwas so und nicht anders gemacht werden sollte, zusammen mit einer Menge Beispielcode jeweils in kurzen Schnipseln. Das liest sich flüssig und trifft zu 90% tatsächlich den Nagel auf den Kopf. Es ist gut, eigene Vorgehensweisen bestätigt zu sehen und an vielen anderen Stellen neue Anstöße zu bekommen.
Alleine die Sprache gefällt mir häufig nicht. So stelle ich mir die Fernsehprediger im US-TV vor: "Do this. Do it now. And do it anytime, anywhere." Sätze in dieser Art finden sich zahlreich und man hat den Eindruck, Wagner will einem tatsächlich eine Heizdecke verkaufen resp. seine Lösungen doppelt und dreifach rhetorisch unterstreichen. Das hätte er gar nicht nötig, die Fakten im Buch sprechen für sich.

Nach der Lektüre wünscht man sich mehr und hofft, dass es bald ein neues Werk zu den besonderen Merkmalen in .NET 3.5 geben könnte. "Effective C#" beschränkt sich nämlich weitgehend auf C# 1.0 mit Schlenkern hin zu 2.0 (z.B. Generics). Das ist keine Einschränkung, denn was für 1.0 guter Stil war gilt zu weiten Teilen auch heute. Aber es lässt eben naturgemäß Spezialitäten in den Neuerungen aus.
1 Stern Abzug also nur für die IMHO allzu amerikanische Darstellungsweise.
11 people found this helpful
Report