Now fully updated to reflect C# 7.0's latest capabilities and newest best practices, Effective C#, Third Edition will help you harness its full power to write exceptionally robust, efficient, maintainable, and well-performing code. Using the concise, scenario-driven style pioneered in Scott Meyers's best-selling Effective C++, Bill Wagner brings together 50 C# best practices, tips, shortcuts, and realistic code examples, helping you quickly master advanced techniques it might take years to discover on your own.
Reflecting the growing maturity of the C# language and the growing sophistication of its development community, Wagner presents many new opportunities to write better code. This edition's solutions include several leveraging new Roslyn APIs, and others relying on improvements to key features such as tuples, record types, and pattern matching.
Drawing on his unsurpassed experience, Wagner addresses everything from resource management and dynamic typing to multicore support, and reveals how to avoid common pitfalls in the language and its .NET environment. Through realistic examples, he helps you choose the most effective solution when multiple options exist, and how to write code that's easier to understand, maintain, and improve.
Each section contains specific, actionable guidelines, organized into "items": short vignettes offering carefully worded advice, concise technical explanations, and illuminating examples. Effective C# and More Effective C# also contain an exclusive digital component: Bill Wagner's Visual Studio Code Analyzer add-in. Run it interactively or as part of a command line build: either way, it will help you identify even more opportunities to improve your code.