Effective Software Development
4 total works
"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).
(c) Copyright Pearson Education. All rights reserved.
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.
"Shining a bright light into many of the dark corners of C# 3.0, this book not only covers the `how,' but also the `why,' arming the reader with many field-tested methods for wringing the most from the new language features, such as LINQ, generics, and multithreading. If you are serious about developing with the C# language, you need this book."
-Bill Craun, Principal Consultant, Ambassador Solutions, Inc.
"More Effective C# is an opportunity to work beside Bill Wagner. Bill leverages his knowledge of C# and distills his expertise down to some very real advice about programming and designing applications that every serious Visual C# user should know. More Effective C# is one of those rare books that doesn't just regurgitate syntax, but teaches you how to use the C# language."
-Peter Ritchie, Microsoft MVP: Visual C#
"More Effective C# is a great follow-up to Bill Wagner's previous book. The extensive
C# 3.0 and LINQ coverage is extremely timely!"
-Tomas Restrepo, Microsoft MVP: Visual C++, .NET, and Biztalk Server
"As one of the current designers of C#, it is rare that I learn something new about the language by reading a book. More Effective C# is a notable exception. Gently blending concrete code and deep insights, Bill Wagner frequently makes me look at C# in a fresh light-one that really makes it shine. More Effective C# is at the surface a collection of very useful guidelines. Look again. As you read through it, you'll find that you acquire more than just the individual pieces of advice; gradually you'll pick up on an approach to programming in C# that is thoughtful, beautiful, and deeply pleasant. While you can make your way willy-nilly through the individual guidelines, I do recommend reading the whole book-or at least not skipping over the chapter introductions before you dive into specific nuggets of advice. There's perspective and insight to be found there that in itself can be an important guide and inspiration for your future adventures in C#."
-Mads Torgersen, Program Manager, Visual C#, Microsoft
"Bill Wagner has written an excellent book outlining the best practices for developers who work with the C# language. By authoring More Effective C#, he has again established himself as one of the most important voices in the C# community. Many of us already know how to use C#. What we need is advice on how to hone our skills so that we can become wiser programmers. There is no more sophisticated source of information on how to become a first-class C# developer than Bill Wagner's book. Bill is intelligent, thoughtful, experienced, and skillful. By applying the lessons from this book to your own code, you will find many ways to polish and improve the work that you produce."
-Charlie Calvert, Community Program Manager, Visual C#, Microsoft
In More Effective C#, Microsoft C# MVP and Regional Director Bill Wagner introduces fifty brand-new ways to write more efficient and more robust software. This all-new book follows the same format as Wagner's best-selling Effective C# (Addison-Wesley, 2005), providing clear, practical explanations, expert tips, and plenty of realistic code examples.
Wagner shows how to make the most of powerful innovations built into Microsoft's new C# 3.0 and .NET Framework 3.5, as well as advanced C# language capabilities not covered in his previous book. Drawing on his unsurpassed C# experience, the author reveals new best practices for working with LINQ, generics, metaprogramming, and many other features. He also uncovers practices that compromise performance or reliability and shows exactly how to avoid them.
More Effective C# shows how to
Use generics to express your design intent more effectivelyMaster advanced generics techniques, such as constraints, method constraints, and generic specializationUse the multithreaded techniques you'll need to work with the .NET framework every dayExpress modern design idioms using the rich palette of C# language featuresSuccessfully mix object oriented and functional programming constructsCreate composable interfaces and avoid confusion in public interfacesUse extension methods to separate contracts from implementationProgram successfully with C# closures and anonymous typesWrite more effective LINQ queriesMake the most of LINQ Lazy Evaluation Queries and Lambda ExpressionsDistinguish and convert between delegates and expression treesEfficiently utilize nullable types and partial classesUse implicit properties for mutable, nonserializable dataYou're already a successful C# programmer-this book can help you become an outstanding one.
In Effective C#, Third Edition, respected .NET expert Bill Wagner identifies 50 ways to harness the full power of the C# 6.0 language to write exceptionally robust, efficient, and well-performing code. Reflecting the growing sophistication of the C# language and its development community, Wagner has identified dozens of new ways to write better code. This edition’s new solutions include some that take advantage of generics and several that are more focused on LINQ, as well as a full chapter of advanced best practices for working with exceptions.
Wagner’s clear, practical explanations, expert tips, and realistic code examples have made Effective C# indispensable to hundreds of thousands of developers. Drawing on his unsurpassed C# experience, he addresses everything from resource management to multicore support, and reveals how to avoid common pitfalls in the language and its .NET environment. Learn how to choose the most effective solution when multiple options exist, and how to write code that’s far easier to maintain and improve. Wagner shows how and why to
- Prefer implicitly typed local variables (see Item 1)
- Replace string.Format() with interpolated strings (see Item 4)
- Express callbacks with delegates (see Item 7)
- Make the most of .NET resource management (see Item 11)
- Define minimal and sufficient constraints for generics (see Item 18)
- Specialize generic algorithms using runtime type checking (see Item 19)
- Use delegates to define method constraints on type parameters (see Item 23)
- Augment minimal interface contracts with extension methods (see Item 27)
- Create composable APIs for sequences (see Item 31)
- Decouple iterations from actions, predicates, and functions (see Item 32)
- Prefer lambda expressions to methods (see Item 38)
- Distinguish early from deferred execution (see Item 40)
- Avoid capturing expensive resources (see Item 41)
- Use exceptions to report method contract failures (see Item 45)
- Leverage side effects in exception filters (see Item 50)
You’re already a successful C# programmer, and this book will make you an outstanding one.
Content Update Program: This book is part of the InformIT Content Update Program. As updates are made to C#, sections of this book will be updated or new sections will be added to match updates to the technologies. See inside for details.