Effective C# and over one million other books are available for Amazon Kindle. Learn more

Buy New

or
Sign in to turn on 1-Click ordering.
or
Amazon Prime Free Trial required. Sign up when you check out. Learn More
Buy Used
Used - Good See details
$18.78 & eligible for FREE Super Saver Shipping on orders over $25. Details

or
Sign in to turn on 1-Click ordering.
 
   
Kindle Edition
 
   
Sell Back Your Copy
For a $12.70 Gift Card
Trade in
More Buying Choices
Have one to sell? Sell yours here
Effective C#  (Covers C# 4.0): 50 Specific Ways to Improve Your C# (2nd Edition) (Effective Software Development Series)
 
 
Start reading Effective C# on your Kindle in under a minute.

Don't have a Kindle? Get your Kindle here, or download a FREE Kindle Reading App.

Effective C# (Covers C# 4.0): 50 Specific Ways to Improve Your C# (2nd Edition) (Effective Software Development Series) [Paperback]

Bill Wagner (Author)
4.3 out of 5 stars  See all reviews (24 customer reviews)

List Price: $39.99
Price: $22.20 & eligible for FREE Super Saver Shipping on orders over $25. Details
You Save: $17.79 (44%)
  Special Offers Available
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 Friday, February 3? Choose One-Day Shipping at checkout. Details
Textbook Student FREE Two-Day Shipping for students on millions of items. Learn more

Formats

Amazon Price New from Used from
Kindle Edition $14.15  
Paperback $22.20  
Sell Back Your Copy for $12.70
Whether you buy it used on Amazon for $14.95 or somewhere else, you can sell it back through our Book Trade-In Program at the current price of $12.70.
Used Price$14.95
Trade-in Price$12.70
Price after
Trade-in
$2.25

Book Description

0321658701 978-0321658708 March 15, 2010 2

C# has matured over the past decade: It’s now a rich language with generics, functional programming concepts, and support for both static and dynamic typing. This palette of techniques provides great tools for many different idioms, but there are also many ways to make mistakes. In Effective C#, Second Edition, respected .NET expert Bill Wagner identifies fifty ways you can leverage the full power of the C# 4.0 language to express your designs concisely and clearly.

 

Effective C#, Second Edition, follows a clear format that makes it 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 types to resource management to dynamic typing to multicore support in the C# language and the .NET framework. Along the way, he shows how to avoid common pitfalls in the C# language and the .NET environment. You’ll learn how to

 

  • Use both types of C# constants for efficiency and maintainability (see Item 2)
  • Employ immutable data types to promote multicore processing (see Item 20)
  • Minimize garbage collection, boxing, and unboxing (see Items 16 and 45)
  • Take full advantage of interfaces and delegates (see Items 22 though 25)
  • Make the most of the parallel framework (see Items 35 through 37)
  • Use duck typing in C# (see Item 38)
  • Spot the advantages of the dynamic and Expression types over reflection (see Items 42 and 43)
  • Assess why query expressions are better than loops (see Item 8)
  • Understand how generic covariance and contravariance affect your designs (see Item 29)
  • See how optional parameters can minimize the number of method overloads (see Item 10)

 

You’re already a successful C# programmer–this book will help you become an outstanding one.


Special Offers and Product Promotions

  • Buy $50 in qualifying physical textbooks, get $5 in Amazon MP3 Credit. Here's how (restrictions apply)

Frequently Bought Together

Customers buy this book with CLR via C# $35.69

Effective C#  (Covers C# 4.0): 50 Specific Ways to Improve Your C# (2nd Edition) (Effective Software Development Series) + CLR via C#
  • This item: Effective C# (Covers C# 4.0): 50 Specific Ways to Improve Your C# (2nd Edition) (Effective Software Development Series)

    In Stock.
    Ships from and sold by Amazon.com.
    Eligible for FREE Super Saver Shipping on orders over $25. Details

  • CLR via C#

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



Editorial Reviews

Review

“Being an effective .NET developer requires one to have a deep understanding of the language of their choice. Wagner’s book provides the reader with that knowledge via well-reasoned arguments and insight. Whether you’re new to C# or you’ve been using it for years, you’ll learn something new when you read this book.”

–Jason Bock, Principal Consultant, Magenic

 

“If you’re at all like me, you have collected a handful of C# language pearls that have immediately transformed your abilities as a professional developer. What you hold in your hands is quite possibly the best collection of these tips that have ever been assembled. Bill has managed to exceed my wildest expectations with the latest edition in his eponymous Effective C#.

–Bill Craun, Principal Consultant, Ambassador Solutions

 

Effective C#, Second Edition, is a must-read for anyone building high performance and/or highly scalable applications. Bill has that rare and awesome ability to take an amazingly complex problem and break it down into human, digestible, and understandable chunks.”

–Josh Holmes, Architect Evangelist, Microsoft

 

“Bill has done it again. This book is a concise collection of invaluable tips for any C# developer. Learn one tip every day, and you’ll become a much better C# developer after fifty days!”

–Claudio Lassala, Lead Developer, EPS Software/CODE Magazine

 

“A fountain of knowledge and understanding of the C# language. Bill gives insight to what happens under the covers of the .NET runtime based on what you write in your code and teaches pragmatic practices that lead to cleaner, easier to write, and more understandable code. A great mix of tips, tricks, and deep understanding–including things true since C# 1.0 up through new capabilities in C# 4.0–that every C# developer should read.”

–Brian Noyes, Chief Architect, IDesign Inc. (www.idesign.net)

 

Effective C# is a must-have for every C# developer. Period. Its pragmatic advice on code design is invaluable.”

–Shawn Wildermuth, Microsoft MVP (C#), Author, Trainer, and Speaker

 

“In this book Bill Wagner provides practical explanations of how to use the most important features in the C# language. His deep knowledge and sophisticated communication skills illuminate the new features in C# so that you can use them to write programs that are more concise and easier to maintain.”

–Charlie Calvert, Microsoft C# Community Program Manager

About the Author

With more than twenty years of experience, Bill Wagner, SRT Solutions cofounder, is a recognized expert in software design and engineering, specializing in C#, .NET, and the Azure platform. He serves as Michigan’s Regional Director for Microsoft and is a multiyear winner of Microsoft’s MVP award. An internationally recognized writer, Bill is the author of the first edition of this book and More Effective C# (Addison-Wesley, 2009) and currently writes a column on the Microsoft C# Developer Center. Bill earned a B.S. in computer science from the University of Illinois at Champaign-Urbana.


Product Details

  • Paperback: 352 pages
  • Publisher: Addison-Wesley Professional; 2 edition (March 15, 2010)
  • Language: English
  • ISBN-10: 0321658701
  • ISBN-13: 978-0321658708
  • Product Dimensions: 9 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 (24 customer reviews)
  • Amazon Best Sellers Rank: #37,359 in Books (See Top 100 in Books)

More About the Authors

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

 

Customer Reviews

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

13 of 13 people found the following review helpful:
5.0 out of 5 stars A new edition brings new insight to C# on .NET 4.0, April 27, 2010
Amazon Verified Purchase(What's this?)
This review is from: Effective C# (Covers C# 4.0): 50 Specific Ways to Improve Your C# (2nd Edition) (Effective Software Development Series) (Paperback)
I have both editions of "Effective C#". The older, first edition did not have lambda expressions, LINQ, or generics (though it hinted at generics towards the end). In the second edition, tips (called "Items") that have since fallen out of practice are weeded out and are replaced with fresh concepts from .NET 2.0, through 4.0.

The items are written in a very clear manner. Most of the figures are illustrative of the concepts. Some of the pictures aren't quite as clear as they could be (.NET's Garbage Collector sticks out in my mind - Bill! read some Tufte! :) but for the most part, each item gave a firm understanding. I could read the first and last paragraph of each item to get a clear bird's eye explanation. Later, I would pore over the details with a highlighter and come away enlightened.

This book has a sister - "More Effective C#". This was released PRIOR to "Effective C# - Second Edition". I own that copy too, and it's dog-eared by now. The two books go together like peas and carrots, though "More Effective C#" touches on more advanced .NET 3.0 concepts. "More Effective C#"'s treatment of "yield return", dependency injection, and composition in the third chapter alone are inspiring.

If you really want to go all out, I'd recommend getting "C# in Depth" by John Skeet. There's a new edition coming out in the summer of 2010. Skeet's book will bring the reader up to speed on the advancements of C# in .NET 3.0 (and soon 4.0) without giving them any specific tips. The "Effective C#" series will give the reader specific tips without bringing anybody up to speed.

Also, the author is a cool guy. I emailed him back in 2009 with questions about the first edition and he brought me up to speed by responding on his blog. You are encouraged to give him feedback.

I consider "Effective C#" as one of the first books I reach when I want to brush up on my skill set.
Help other customers find the most helpful reviews 
Was this review helpful to you? Yes No


13 of 14 people found the following review helpful:
2.0 out of 5 stars Would you tell me, please, which way I ought to code from here?, August 4, 2011
By 
James Daniel (Austin, TX United States) - See all my reviews
(REAL NAME)   
Amazon Verified Purchase(What's this?)
This review is from: Effective C# (Covers C# 4.0): 50 Specific Ways to Improve Your C# (2nd Edition) (Effective Software Development Series) (Paperback)
I should be clear, I am not criticizing this book as being "bad", but it turns out to have been the least useful C# book I've purchased. This is admittedly in part due to my own preferences and perceptions about what I need from various C# books.

There is a quote from Alice in Wonderland that I find quite applicable here:
Alice: Would you tell me, please, which way I ought to go from here?
The Cat: That depends a good deal on where you want to get to.

This quote kept coming to mind as I read through all 50 tips. They aren't really tips so much as, well, good ideas, assuming what the author is describing is what you want to do. If it isn't what you want to do, any given tip is either not applicable, or actually a bad idea.

I found myself thinking, about each tip, one of three things:
1) Well, yes, of course, that's a good best practice. For most of these, I already knew that. The only one that impressed me was using readonly vs const: it was a good overall explanation of how const can backfire.
2) Um, no, that really isn't true, though a lot of people think it is. In particular his discussion of StringBuilder vs string concatenation was much less enlightening than googling for the topic and reading useful forum/blog posts.
3) Um, I guess that's a good idea, assuming that's what you intend to do in the first place. (Most of the book fit into this category for me.)

So I find myself reading tips that are either really obvious, or I believe they're wrong or slightly misinformed, or they really don't apply to anything I need to do at all. The author appears to use C# mostly to write APIs that would be used generally by others, e.g., more on the "web service" side than the "web application" side. If your goal is to write APIs, you may very well find these tips to be much more useful than I do. The tips aren't "wrong", but as I find myself usually writing applications instead of APIs, they don't explain anything that I'd actually use. Other tips discuss architecture decisions that would never come up for the person who is merely responsible for implementing them: this is sometimes useful, but really, architecture decisions are entirely dependent on what you want the application to do (queue the Alice quote again).

I would suggest that his worst tip is the one where he briefly discusses the StringBuilder vs string concatenation debate. The tip is to not create unnecessary objects. This is certainly a valid concern. He doesn't really weigh the advantages/disadvantages, rather he simply asserts that StringBuilder is better because fewer objects are created for the garbage collector to collect. I don't want to belabor the already-well-known-and-easily-googled discussions on the matter, but suffice it to say, the real answer is "it depends". Sometimes StringBuilder is clearly the best choice. Sometimes simple string concatenation is clearly superior (the garbage collector really is very smart about how to handle the extra strings that are orphaned by concatenation, so long as you don't abuse it). And String.Format really isn't all that advantageous, either, unless you need special/complex formatting, because it goes and creates a new StringBuilder (with associated overhead and requiring garbage collection) every time you call it.

"Would you tell me, please, which way I ought to [code] from here?" asked Alice. "That depends a good deal on where you want to get to," replied the Cat.

I would steer those who are looking for expert-level knowledge about how C# "really works" to check out Jon Skeet's "C# in Depth, Second Edition", also available from Amazon. It covers many of the same topics, but I believe it provides a deeper understanding of C# such that you don't need any "specific tips", but rather the correct course of action becomes obvious based on the circumstances at hand.
Help other customers find the most helpful reviews 
Was this review helpful to you? Yes No


17 of 21 people found the following review helpful:
1.0 out of 5 stars Poor Kindle Edition, July 12, 2011
Amazon Verified Purchase(What's this?)
The Kindle edition uses different font weights so that the text is shown differently from the code.
a) A normal black for the text; and
b) a completely invisible grey for the code.
If you have any desire to actually see the code in this book, don't bother with the Kindle edition.
The conversion was very shoddy.
Help other customers find the most helpful reviews 
Was this review helpful to you? Yes No

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











Only search this product's reviews



Inside This Book (learn more)
Browse Sample Pages:
Front Cover | Table of Contents | First Pages | Index | Surprise Me!
Search Inside This Book:

What Other Items Do Customers Buy After Viewing This Item?


Tags Customers Associate with This Product

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

Your tags: Add your first tag
 

Customer Discussions

This product's forum
Discussion Replies Latest Post
No discussions yet

Ask questions, Share opinions, Gain insight
Start a new discussion
Topic:
First post:
Prompts for sign-in
 


Active discussions in related forums
Search Customer Discussions
Search all Amazon discussions
   
Related forums





Look for Similar Items by Category


Look for Similar Items by Subject