More Effective C# (Includes Content Update Program): 50 Specific Ways to Improve Your C#, Edition 2

Addison-Wesley Professional
Free sample

In More Effective C#, Second Edition, world-renowned .NET expert Bill Wagner identifies and illuminates 50 intermediate-to-advanced techniques for writing exceptionally robust and well-performing C# 7.0 code. Reflecting the growing sophistication of the C# language and its development community, Wagner presents powerful new solutions to problems you’re likely to encounter every day.

Through three editions of Effective C#, Wagner’s clear explanations, expert tips, and realistic code examples have proven invaluable to hundreds of thousands of developers. With the publication of this title, Effective C#, Third Edition, and More Effective C#, Second Edition, have been completely reorganized to provide clear explanations, expert tips, and realistic code examples in a cohesive package for modern C#. More Effective C#, Second Edition, brings the same proven approach to the new features in C# 7.0, helping you perform familiar tasks more efficiently and effectively.

Drawing on his unsurpassed C# experience and key role on global C# standards committees, Wagner addresses object-oriented, functional, and service-oriented approaches to managing data with C#; better ways to express your intent to users and other programmers; and new opportunities to leverage powerful asynchronous and dynamic programming techniques.

  • Use properties instead of accessible data members (Item 1)
  • Distinguish between value and reference types (Item 4)
  • Understand relationships among multiple concepts of equality (Item 9)
  • Avoid conversion operators in your APIs (Item 11)
  • Understand how interface and virtual methods differ (Item 15)
  • Avoid overloading methods defined in base classes (Item 19)
  • Create method groups that are clear, minimal, and complete (Item 22)
  • Enable immediate error reporting in iterators and async methods (Item 26)
  • Use async methods for async work (Item 27)
  • Avoid thread allocations and context switches (Item 30)
  • Construct PLINQ parallel algorithms with exceptions in mind (Item 36)
  • Use the thread pool instead of creating threads (Item 37)
  • Use BackgroundWorker for cross-thread communication (Item 38)
  • Use the smallest possible scope for lock handles (Item 41)
  • Understand the pros and cons of dynamic programming (Item 43)
  • Make full use of the expression API (Item 46)
  • Minimize dynamic objects in public APIs (Item 47)

You’re already a successful C# programmer: 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.


Register your product at informit.com/register for convenient access to downloads, updates, and corrections as they become available.

Read more

About the author

Bill Wagner is one of the world’s foremost C# developers, a member of the ECMA C# Standards Committee, and author of all three editions of Effective C#. He is president of the Humanitarian Toolbox, has been awarded Microsoft Regional Director and .NET MVP for 11 years, and was recently appointed to the .NET Foundation Advisory Council. Wagner has helped companies ranging from start-ups to enterprises to improve development processes and grow development teams. Now a member of Microsoft’s .NET Core content team, he creates developer learning materials on the C# language and .NET Core.
Read more
Loading...

Additional Information

Publisher
Addison-Wesley Professional
Read more
Published on
Aug 14, 2017
Read more
Pages
304
Read more
ISBN
9780134579337
Read more
Language
English
Read more
Genres
Computers / Programming / Microsoft
Computers / Programming Languages / C#
Read more
Content Protection
This content is DRM protected.
Read more
Eligible for Family Library

Reading information

Smartphones and Tablets

Install the Google Play Books app for Android and iPad/iPhone. It syncs automatically with your account and allows you to read online or offline wherever you are.

Laptops and Computers

You can read books purchased on Google Play using your computer's web browser.

eReaders and other devices

To read on e-ink devices like the Sony eReader or Barnes & Noble Nook, you'll need to download a file and transfer it to your device. Please follow the detailed Help center instructions to transfer the files to supported eReaders.
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.

©2018 GoogleSite Terms of ServicePrivacyDevelopersArtistsAbout Google|Location: United StatesLanguage: English (United States)
By purchasing this item, you are transacting with Google Payments and agreeing to the Google Payments Terms of Service and Privacy Notice.