IMPORTANT COVID-19 UPDATES

9780672337888

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

by
  • ISBN13:

    9780672337888

  • ISBN10:

    0672337886

  • Edition: 2nd
  • Format: Paperback
  • Copyright: 2017-08-15
  • Publisher: Addison-Wesley Professional
  • Purchase Benefits
  • Free Shipping On Orders Over $35!
    Your order must be $35 or more to qualify for free economy shipping. Bulk sales, PO's, Marketplace items, eBooks and apparel do not qualify for this offer.
  • Get Rewarded for Ordering Your Textbooks! Enroll Now
List Price: $44.99 Save up to $5.40
  • Buy New
    $42.74
    Add to Cart Free Shipping

    USUALLY SHIPS IN 7-10 BUSINESS DAYS

Supplemental Materials

What is included with this book?

Summary

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.

Author Biography

Bill Wagner is one of the world’s foremost C# developers and a member of the ECMA C# Standards Committee. 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 worked with companies ranging from start-ups to enterprises improving the software development process and growing their software development teams. He is currently with Microsoft, working on the .NET Core content team. He creates learning materials for developers interested in the C# language and .NET Core. Bill earned a B.S. in computer science from the University of Illinois at Champaign-Urbana.

Table of Contents

Partial Table of Contents: To be updated
Item 2: Define Constraints That Are Minimal and Sufficient
Item 3: Specialize Generic Algorithms Using Runtime Type Checking
Item 4: Use Generics to Force Compile-Time Type Inference
Item 5: Ensure That Your Generic Classes Support Disposable Type Parameters
Item 6: Use Delegates to Define Method Constraints on Type Parameters
Item 7: Do Not Create Generic Specialization on Base Classes or Interfaces
Item 8: Prefer Generic Methods Unless Type Parameters Are Instance Fields
Item 10: Implement Classic Interfaces in Addition to Generic Interfaces
Item 11: Use the Thread Pool Instead of Creating Threads
Item 12: Use BackgroundWorker for Cross-Thread Communication
Item 13: Use lock() as Your First Choice for Synchronization
Item 14: Use the Smallest Possible Scope for Lock Handles
Item 15: Avoid Calling Unknown Code in Locked Sections
Item 16: Understand Cross-Thread Calls in Windows Forms and WPF
Item 17: Create Composable APIs for Sequences
Item 18: Decouple Iterations from Actions, Predicates, and Functions
Item 19: Generate Sequence Items as Requested
Item 20: Loosen Coupling by Using Function Parameters
Item 21: Create Method Groups That Are Clear, Minimal, and Complete
Item 23: Understand How Events Increase Runtime Coupling Among Objects
Item 24: Declare Only Nonvirtual Events
Item 25: Use Exceptions to Report Method Contract Failures
Item 26: Ensure That Properties Behave Like Data
Item 28: Augment Minimal Interface Contracts with Extension Methods
Item 29: Enhance Constructed Types with Extension Methods
Item 30: Prefer Implicitly Typed Local Variables
Item 31: Limit Type Scope by Using Anonymous Types
Item 33: Avoid Modifying Bound Variables
Item 34: Define Local Functions on Anonymous Types
Item 35: Never Overload Extension Methods
Item 36: Understand How Query Expressions Map to Method Calls
Item 37: Prefer Lazy Evaluation Queries
Item 38: Prefer Lambda Expressions to Methods
Item 39: Avoid Throwing Exceptions in Functions and Actions
Item 40: Distinguish Early from Deferred Execution
Item 41: Avoid Capturing Expensive Resources
Item 42: Distinguish Between IEnumerable and IQueryable Data Sources
Item 43: Use Single() and First() to Enforce Semantic Expectations on Queries
Item 44: Prefer Storing Expression<> to Func<>
Item 46: Give Partial Classes Partial Methods for Constructors, Mutators, and Event Handlers
Item 47: Limit Array Parameters to Params Arrays
Item 48: Avoid Calling Virtual Functions in Constructors Reviews
Item 50: Prefer Implicit Properties for Mutable, Nonserializable Data

Rewards Program

Write a Review