Programming Books C Java PHP Python Learn more Browse Programming Books
Effective C#: 50 Specific Ways to Improve Your C# and over one million other books are available for Amazon Kindle. Learn more
Qty:1
  • List Price: $59.99
  • Save: $10.02 (17%)
In Stock.
Ships from and sold by Amazon.com.
Gift-wrap available.
FREE Shipping on orders over $35.
Condition: Used: Good
Comment: Solid used copy with visible wear to covers. May contain underlines or highlights. Ships directly to you with tracking from Amazon's warehouse - fast, secure and FREE WITH AMAZON PRIME.
Access codes and supplements are not guaranteed with used items.
Have one to sell? Sell on Amazon
Flip to back Flip to front
Listen Playing... Paused   You're listening to a sample of the Audible audio edition.
Learn more
See this image

Effective C#: 50 Specific Ways to Improve Your C# Paperback – December 13, 2004

ISBN-13: 978-0321245663 ISBN-10: 0321245660 Edition: 1st

Buy New
Price: $49.97
19 New from $9.98 46 Used from $0.01
Amazon Price New from Used from
Kindle
"Please retry"
Paperback
"Please retry"
$49.97
$9.98 $0.01

Frequently Bought Together

Effective C#: 50 Specific Ways to Improve Your C# + More Effective C#: 50 Specific Ways to Improve Your C#
Price for both: $89.13

Buy the selected items together
NO_CONTENT_IN_FEATURE

Hero Quick Promo
12 Days of Kindle Book Deals
Load your library with Amazon's editors' picks, $2.99 or less each today only. Learn more

Product Details

  • Paperback: 336 pages
  • Publisher: Addison-Wesley Professional; 1 edition (December 13, 2004)
  • Language: English
  • ISBN-10: 0321245660
  • ISBN-13: 978-0321245663
  • Product Dimensions: 7 x 0.8 x 9.2 inches
  • Shipping Weight: 1.3 pounds (View shipping rates and policies)
  • Average Customer Review: 4.4 out of 5 stars  See all reviews (31 customer reviews)
  • Amazon Best Sellers Rank: #662,316 in Books (See Top 100 in Books)

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

Introduction. 1. C# Language Elements. Item 1 - Always Use Properties Instead of Accessible Data Members. Item 2 - Prefer readonly to const. Item 3 - Prefer the is or as Operators to Casts. Item 4 - Use Conditional Attributes Instead of #if. Item 5 - Always Provide ToString(). Item 6 - Distinguish Between Value Types and Reference Types. Item 7 - Prefer Immutable Atomic Value Types. Item 8 - Ensure That 0 Is a Valid State for Value Types. Item 9 - Understand the Relationships Among ReferenceEquals(),static Equals(), instance Equals(), and operator==. Item 10 - Understand the Pitfalls of GetHashCode(). Item 11 - Prefer foreach Loops. 2. .NET Resource Management. Item 12 - Prefer Variable Initializers to Assignment Statements. Item 13 - Initialize Static Class Members with Static Constructors. Item 14 - Utilize Constructor Chaining. Item 15 - Utilize using and try/finally for Resource Cleanup. Item 16 - Minimize Garbage. Item 17 - Minimize Boxing and Unboxing. Item 18 - Implement the Standard Dispose Pattern. 3. Expressing Designs with C#. Item 19 - Prefer Defining and Implementing Interfaces to Inheritance. Item 20 - Distinguish Between Implementing Interfaces and Overriding Virtual Functions. Item 21 - Express Callbacks with Delegates. Item 22 - Define Outgoing Interfaces with Events. Item 23 - Avoid Returning References to Internal Class Objects. Item 24 - Prefer Declarative to Imperative Programming. Item 25 - Prefer Serializable Types. Item 26 - Implement Ordering Relations with IComparable and Icomparer. Item 27 - Avoid Icloneable. Item 28 - Avoid Conversion Operators. Item 29 - Use the new Modifier Only When Base Class Updates Mandate It. 4. Creating Binary Components. Item 30 - Prefer CLS-Compliant Assemblies. Item 31 - Prefer Small, Simple Functions. Item 32 - Prefer Smaller, Cohesive Assemblies. Item 33 - Limit Visibility of Your Types. Item 34 - Create Large-Grain Web APIs. 5. Working with the Framework. Item 35 - Prefer Overrides to Event Handlers. Item 36 - Leverage .NET Runtime Diagnostics. Item 37 - Use the Standard Configuration Mechanism. Item 38 - Utilize and Support Data Binding. Item 39 - Use .NET Validation. Item 40 - Match Your Collection to Your Needs. Item 41 - Prefer DataSets to Custom Structures. Item 42 - Utilize Attributes to Simplify Reflection. Item 43 - Don't Overuse Reflection. Item 44 - Create Complete Application-Specific Exception Classes. 6. Miscellaneous. Item 45 - Prefer the Strong Exception Guarantee. Item 46 - Minimize Interop. Item 47 - Prefer Safe Code. Item 48 - Learn About Tools and Resources. Item 49 - Prepare for C# 2.0. Item 50 - Learn About the ECMA Standard. Index.

More About the Author

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

I recommend this as your second C# book.
John Matlock
Overall, Effective C# demystifies C# allowing programmers to fully understand and thus take advantage of the power and pitfalls of the language.
Alexander Jhin
Bill did an excellent job with this book in the vein of the notoriously popular Effective C++ by Scott himself.
Paul Kimmel

Most Helpful Customer Reviews

25 of 26 people found the following review helpful By Steven on July 7, 2005
Format: Paperback
Wow, what at relief this book is, really.

I have read numerous C# books and most of them do about the same thing. They touch base on a wide array of topics (database, oop, multi-threading, arrays, indexers...etc), thus you really never learn any of the more advanced stuff. Really, how many times have you read about an animal hierarchy whilst browsing through an OOP section of a programming book?

Well, in comes Effective C#. This book doesn't really focus much on specific topics (like how to do database programming and such), instead, you learn 50 specific ways to improve your C# code. For example: You have undoubtedly read about properties if you've read any basic C# book... You probably think you know everything there is to know about them... I mean, really, generally we use public properties to access private variables in a class. Well, one of the topics in this book focuses on properties - I never realized how much more there is to learn about something as simple as a property!

This book is a thinker. You will browse these pages and think to yourself "Wow! I never realized you could do that!". Your expertise on C# will definitely go up a notch or two. That brings me to my next point: This is no easy read! Even if you feel that you're at an intermediate level, you will find some of the text difficult to absorb on the first couple passes. This is definitely a techie book through and through (which isn't all that bad), but at times it may seem slightly dry.

If you are a beginner then I might pass this book up for a later day. If you are intermediate - advanced then I would definitely think about picking this baby up.
Comment Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback. If this review is inappropriate, please let us know.
Sorry, we failed to record your vote. Please try again
36 of 40 people found the following review helpful By Martin L. Shoemaker on July 24, 2005
Format: Paperback
FULL DISCLOSURE: I know Bill Wagner pretty well, and consider him a friend. I don't think that has colored this review, but you have a right to know. (If you doubt my objectivity, consider that I have now purchased TWO copies of this book, even though I probably could have gotten one or two for free. It's worth it!)

Back when I was a C++ programmer, there was one book everyone said I simply had to read: Effective C++ by Scott Meyers. And they were right: when I read that book, I summarized it as "Here are 50 mistakes you're making in your C++ code right now, and you don't even know it." (Note: the latest edition has been expanded to 55 mistakes.) So now that I'm a C# programmer, I eagerly looked forward to Effective C# (edited by Meyers), because I wanted that same sort of "Aha!" enlightenment.

Well, Bill Wagner failed to deliver that enlightenment. But that's a good thing, actually, and something he couldn't help. But to understand why, we have to return to Scott Meyers.

After the 50 amazingly simple improvements in Effective C++, Meyers wrote More Effective C++; and I characterized that book as, "35 really deep subjects that you have to think about and understand. Some of them will apply to your work. Some of them won't. None of them will be easy. But you really have to think about them." See, Meyers covered all the simple, universal problems in his first book, making it darned hard to make any simple, obvious C++ mistakes. That meant his second book had to cover deeper design concerns, many of which apply only in particular circumstances.

And herein lies the difference for Wagner's book. See, a generation of C++ programmers learned and internalized Meyers's lessons -- including the Microsoft team who created the C# language.
Read more ›
1 Comment Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback. If this review is inappropriate, please let us know.
Sorry, we failed to record your vote. Please try again
13 of 16 people found the following review helpful By Damon Slye on November 26, 2006
Format: Paperback
First off, since writing my initial review, I find myself continually referring to this book. It has worn well. I wish I could change my rating from 3 to 4 stars. Unfortunately Amazon's review system doesn't allow that (only 3 stars for them!).

While there are many books that teach the C# languague, this is the only book I've found that offers advice on how to effectively use the language once you know it. It is unique and therefore indispensible. It's a "must-read" for any serious C# programmer.

The recommendations will help you understand C# so that you can write programs that are faster, more efficient, more maintainable, and easier to understand. Specific topics include things like value-types versus reference-types, "boxing" and "unboxing", minimizing garbage, the advantages of the operators "as" and "is" over casts, and so on.

I believe the writing and explanations could be more clear and concise. I wish the editors had spent a little more time cleaning up the text. Also, A second edition that assumes C# 2.0 should be released, since some of the recommendations deal with shortcomings of C# 1.0 that have been fixed by C# 2.0. Also, I found a couple small errors. For example, "as" is not always faster than a cast-- in some cases they generate code that is exactly the same speed. However, that's a trifling point.

I recommend this book.
Comment Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback. If this review is inappropriate, please let us know.
Sorry, we failed to record your vote. Please try again
5 of 6 people found the following review helpful By vbguy on April 10, 2007
Format: Paperback
I agree with those who say that Effective C# is not for beginners. Even experienced programmers should go elsewhere for an introduction to the language and the .NET environment. While other books might serve as a comprehensive textbook for learning the rudiments, this one offers some in-depth insights into how to build solutions that are elegant, efficient, reliable, and maintainable.

I also agree with those who are disappointed in the poor editing. The book is riddled with typos, especially word spacing problems. Mostly, these are little more than a minor annoyance but they make the book a really poor example of publishing quality.

"Software engineering" has been described as finding the best solution for a given problem where "programming" is merely a matter of developing something that works. That's what this book is all about. Sure, there are going to be times when you don't need to build the kind of quality into your code that the author advocates. The need to get something done quickly will often outweigh issues like whether you're really getting optimal performance, whether accepted OO principles are always being followed, or whether your employing the best of all possible solutions. But this book is about how build "industrial strength" classes that can be reused without breaking or creating undue heartburn for the poor slobs who have to rely on them.

Like most programming books, lots of the information is conveyed in code examples. However, this is not the book you'll want if you're going to cut-and-paste somebody's sample program and hack it into your own working version. In fact, the code examples are so brief and simple that they often seem almost pointless at first glance.
Read more ›
Comment Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback. If this review is inappropriate, please let us know.
Sorry, we failed to record your vote. Please try again

Most Recent Customer Reviews