Effective C#: 50 Specific Ways to Improve Your C# and over 360,000 other books are available for Amazon Kindle – Amazon’s new wireless reading device. Learn more

 

or
Sign in to turn on 1-Click ordering.
 
 
Express Checkout with PayPhrase
What's this? | Create PayPhrase
More Buying Choices
49 used & new from $20.16

Have one to sell? Sell yours here
 
   
Effective C#: 50 Specific Ways to Improve Your C#
 
 
Start reading Effective C#: 50 Specific Ways to Improve Your C# on your Kindle in under a minute.

Don’t have a Kindle? Get your Kindle here.
 
  

Effective C#: 50 Specific Ways to Improve Your C# (Paperback)

~ (Author) "Why should you change what you are doing today if it works?..." (more)
Key Phrases: resource cleanup, instance initializers, imperative programming, Expressing Designs, Language Elements, Garbage Collector (more...)
4.3 out of 5 stars  See all reviews (30 customer reviews)

List Price: $54.99
Price: $37.11 & this item ships for FREE with Super Saver Shipping. Details
You Save: $17.88 (33%)
o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o
In Stock.
Ships from and sold by Amazon.com. Gift-wrap available.

Want it delivered Wednesday, November 25? Choose One-Day Shipping at checkout. Details
37 new from $28.99 12 used from $20.16

Formats

Amazon Price New from Used from
  Kindle Edition, February 18, 2009 $29.69 -- --
  Paperback, March 21, 2010 $26.39 $26.39 --
  Paperback, December 13, 2004 $37.11 $28.99 $20.16

Frequently Bought Together

Effective C#: 50 Specific Ways to Improve Your C# + More Effective C#: 50 Specific Ways to Improve Your C# + C# in Depth
Price For All Three: $98.29

Show availability and shipping details

  • This item: Effective C#: 50 Specific Ways to Improve Your C# by Bill Wagner

    In Stock.
    Ships from and sold by Amazon.com.
    This item ships for FREE with Super Saver Shipping. Details

  • More Effective C#: 50 Specific Ways to Improve Your C# by Bill Wagner

    In Stock.
    Ships from and sold by Amazon.com.
    This item ships for FREE with Super Saver Shipping. Details

  • C# in Depth by Jon Skeet

    In Stock.
    Ships from and sold by Amazon.com.
    This item ships for FREE with Super Saver Shipping. Details


Customers Who Bought This Item Also Bought

More Effective C#: 50 Specific Ways to Improve Your C#

More Effective C#: 50 Specific Ways to Improve Your C#

by Bill Wagner
4.4 out of 5 stars (12)  $31.49
C# in Depth

C# in Depth

by Jon Skeet
4.8 out of 5 stars (35)  $29.69
Framework Design Guidelines: Conventions, Idioms, and Patterns for Reusable .NET Libraries (2nd Edition)

Framework Design Guidelines: Conventions, Idioms, and Patterns for Reusable .NET Libraries (2nd Edition)

by Krzysztof Cwalina
4.6 out of 5 stars (8)  $32.25
Concurrent Programming on Windows

Concurrent Programming on Windows

by Joe Duffy
4.5 out of 5 stars (13)  $42.89
CLR via C#, Second Edition (Pro Developer)

CLR via C#, Second Edition (Pro Developer)

by Jeffrey Richter
4.8 out of 5 stars (48)  $37.79
Explore similar items

Editorial Reviews

Product Description

"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). A(c) Copyright Pearson Education. All rights reserved.


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.


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: 9.1 x 6.9 x 0.9 inches
  • Shipping Weight: 1.3 pounds (View shipping rates and policies)
  • Average Customer Review: 4.3 out of 5 stars  See all reviews (30 customer reviews)
  • Amazon.com Sales Rank: #30,868 in Books (See Bestsellers in Books)

    Popular in this category: (What's this?)

    #23 in  Books > Computers & Internet > Programming > Languages & Tools > C#

More About the Author

Bill Wagner
Discover books, learn about writers, read author blogs, and more.

Visit Amazon's Bill Wagner Page

Inside This Book (learn more)

What Do Customers Ultimately Buy After Viewing This Item?

Effective C#: 50 Specific Ways to Improve Your C#
62% buy the item featured on this page:
Effective C#: 50 Specific Ways to Improve Your C# 4.3 out of 5 stars (30)
$37.11
More Effective C#: 50 Specific Ways to Improve Your C#
17% buy
More Effective C#: 50 Specific Ways to Improve Your C# 4.4 out of 5 stars (12)
$31.49
C# in Depth
12% buy
C# in Depth 4.8 out of 5 stars (35)
$29.69
Microsoft® .NET: Architecting Applications for the Enterprise (PRO-Developer)
5% buy
Microsoft® .NET: Architecting Applications for the Enterprise (PRO-Developer) 4.8 out of 5 stars (21)
$29.69

Tags Customers Associate with This Product

 (What's this?)
Click on a tag to find related items, discussions, and people.
 
(11)
(1)
(1)

Your tags: Add your first tag
 

 

Customer Reviews

30 Reviews
5 star:
 (18)
4 star:
 (5)
3 star:
 (6)
2 star:
 (1)
1 star:    (0)
 
 
 
 
 
Average Customer Review
4.3 out of 5 stars (30 customer reviews)
 
 
 
 
Share your thoughts with other customers:
Most Helpful Customer Reviews

 
17 of 19 people found the following review helpful:
5.0 out of 5 stars Not the Book I Was Expecting, July 24, 2005
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. When they built their C++-inspired (and Java-inspired) language, they built in a lot of the safeguards and limits that Meyers advocated as a standard practice for C++. They also built in best practices from other sources. So it's my contention that the C# equivalent to Effective C++ can't really be written. The language won't allow it.

So what Wagner has written really falls somewhere between Effective C++ and More Effective C++. There are some simple "Aha!" tips; but there are a lot more deep design concerns. That's really what the C# programmer needs, after all; and that's what Wagner delivers in a very fine fashion.

Now Wagner can explain these topics better than I can, so I'm not going to try. But I do want to comment on the items I found most useful:

5. Always provide ToString(). Your maintenance and client coders will thank you.

15. Utilize using and try/finally for Resource Cleanup. And 18. Implement the Standard Dispose Pattern. .NET pretty much solves memory leaks; but memory is only the most commonly leaked resource. And in solving memory leaks, they made it harder to manage certain other resources. In these two items, Wagner shows how to do the best job you can.

I wish I could say I was following every tip in this book; but it's hard to break bad habits. Read this book before you form bad habits yourself.

Note that the original printing of this book had a lot of typos where words rantogether. I now have a copy of the second printing, where those all seem to be fixed.
Comment Comment | Permalink | Was this review helpful to you? Yes No (Report this)



 
12 of 13 people found the following review helpful:
4.0 out of 5 stars Not for the C# newbie., July 7, 2005
By Steven (Colorado, USA) - See all my reviews
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 Comment | Permalink | Was this review helpful to you? Yes No (Report this)



 
7 of 8 people found the following review helpful:
3.0 out of 5 stars Four Stars : Excellent content, but the writing could be a bit more clear, November 26, 2006
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 Comment | Permalink | Was this review helpful to you? Yes No (Report this)


Share your thoughts with other customers: Create your own review
 
 
 
Most Recent Customer Reviews

5.0 out of 5 stars Who wants to be ineffective
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... Read more
Published 2 months ago by Wallace P. Middleton

3.0 out of 5 stars Slightly Disappointed with Writing Style and Typos
First of all, the positive of the book includes:

- The use of simple examples to illustrate the points;

- Good coverage of common noted C# pitfalls and... Read more
Published 6 months ago by henry000

5.0 out of 5 stars `
This book is the difference between a programmer who knows C# and becoming a true C# "craftsman". Absolutely recommended!
Published 7 months ago by Dave Black

3.0 out of 5 stars Could stand a rewrite
This book would benefit greatly from a rewrite. It is often difficult to follow the authors' logic. I get the impression that this book was rushed to print. Read more
Published 16 months ago by Steve Otto

5.0 out of 5 stars A must for every C# Developer
This book has helped me identify and made some performance improvements to my C# software code. One thing I like about this book, is that the author cuts right to the chase in... Read more
Published 16 months ago by David Taylor

5.0 out of 5 stars Things you should know if you're serious about .Net/C#
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
Published 17 months ago by Sylvain Bernard

5.0 out of 5 stars HOW ABOUT A C# 3.0 EDITION?
Excellent book. My only complaint -- where's the new edition for the new version(s) of the framework?
Published on June 20, 2007 by jeffery

4.0 out of 5 stars very worthwhile
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 . Read more
Published on April 10, 2007 by vbguy

3.0 out of 5 stars Could be better
Some of these glowing reviews are a bit misleading. Effective C# is a decent book, but not great. This book covers much of the same material as Jeffrey Richter's "CLR via C#",... Read more
Published on February 22, 2007 by Jason E. Smith

5.0 out of 5 stars Worthy of Scott Meyers
Bill did an excellent job with this book in the vein of the notoriously popular Effective C++ by Scott himself.
Published on May 12, 2006 by Paul Kimmel

Only search this product's reviews



Customer Discussions

This product's forum
Discussion Replies Latest Post
New edition for C# 2.0? 0 March 2006
See all discussions...  
Start a new discussion
Topic:
First post:
Prompts for sign-in
 

Search Customer Discussions
   




Product Information from the Amapedia Community

Beta (What's this?)


Look for Similar Items by Category


Look for Similar Items by Subject

 

Feedback

If you need help or have a question for Customer Service, contact us.
 Would you like to update product info or give feedback on images?
Is there any other feedback you would like to provide?

Your comments can help make our site better for everyone.


Your Recent History

 (What's this?)

After viewing product detail pages or search results, look here to find an easy way to navigate back to pages you are interested in.