Description
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 title is no longer part of the Content Update Program. The content is final, and no further updates will be released.
About the Author
Bill Wagner creates .NET learning materials for Microsoft. He is one of the world's foremost C# experts and is a member of the ECMA C# Standards Committee. The president of Humanitarian Toolbox, he also now serves on the .NET Foundation Advisory Council and Technical Steering Committees. Wagner has worked with companies ranging from start-ups to enterprises, improving development processes and growing development teams. An internationally recognized writer, he authored this book's first two editions, as well as More Effective C#. He holds a B.S. in computer science from the University of Illinois at Champaign-Urbana.
Reviews
Praise for Effective C#, Second Edition
"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 . . . 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
Book Information
ISBN 9780672337871
Author Bill Wagner
Format Paperback
Page Count 288
Imprint Addison-Wesley Educational Publishers Inc
Publisher Pearson Education (US)