More Effective C#
Home > Computing and Information Technology > Computer programming / software engineering > Programming and scripting languages: general > More Effective C#: 50 Specific Ways to Improve Your C#(Effective Software Development Series)
More Effective C#: 50 Specific Ways to Improve Your C#(Effective Software Development Series)

More Effective C#: 50 Specific Ways to Improve Your C#(Effective Software Development Series)


     0     
5
4
3
2
1



Out of Stock


Notify me when this book is in stock
X
About the Book

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.

Table of Contents:
Introduction xi   Chapter 1: Working with Data Types 1 Item 1: Use Properties Instead of Accessible Data Members 1 Item 2: Prefer Implicit Properties for Mutable Data 8 Item 3: Prefer Immutability for Value Types 12 Item 4: Distinguish Between Value Types and Reference Types 18 Item 5: Ensure That 0 Is a Valid State for Value Types 24 Item 6: Ensure That Properties Behave Like Data 28 Item 7: Limit Type Scope by Using Tuples 34 Item 8: Define Local Functions on Anonymous Types 39 Item 9: Understand the Relationships Among the Many Different Concepts of Equality 45 Item 10: Understand the Pitfalls of GetHashCode() 54   Chapter 2: API Design 61 Item 11: Avoid Conversion Operators in Your APIs 61 Item 12: Use Optional Parameters to Minimize Method Overloads 65 Item 13: Limit Visibility of Your Types 69 Item 14: Prefer Defining and Implementing Interfaces to Inheritance 73 Item 15: Understand How Interface Methods Differ from Virtual Methods 82 Item 16: Implement the Event Pattern for Notifications 86 Item 17: Avoid Returning References to Internal Class Objects 93 Item 18: Prefer Overrides to Event Handlers 97 Item 19: Avoid Overloading Methods Defined in Base Classes 100 Item 20: Understand How Events Increase Runtime Coupling Among Objects 104 Item 21: Declare Only Nonvirtual Events 107 Item 22: Create Method Groups That Are Clear, Minimal, and Complete 113 Item 23: Give Partial Classes Partial Methods for Constructors, Mutators, and Event Handlers 120 Item 24: Avoid ICloneable Because It Limits Your Design Choices 125 Item 25: Limit Array Parameters to params Arrays 129 Item 26: Enable Immediate Error Reporting in Iterators and Async Methods Using Local Functions 134   Chapter 3: Task-Based Asynchronous Programming 139 Item 27: Use Async Methods for Async Work 139 Item 28: Never Write async void Methods 143 Item 29: Avoid Composing Synchronous and Asynchronous Methods 149 Item 30: Use Async Methods to Avoid Thread Allocations and Context Switches 154 Item 31: Avoid Marshalling Context Unnecessarily 156 Item 32: Compose Asynchronous Work Using Task Objects 160 Item 33: Consider Implementing the Task Cancellation Protocol 166 Item 34: Cache Generalized Async Return Types 173   Chapter 4: Parallel Processing 177 Item 35: Learn How PLINQ Implements Parallel Algorithms 177 Item 36: Construct Parallel Algorithms with Exceptions in Mind 189 Item 37: Use the Thread Pool Instead of Creating Threads 195 Item 38: Use BackgroundWorker for Cross-Thread Communication 201 Item 39: Understand Cross-Thread Calls in XAML Environments 205 Item 40: Use lock() as Your First Choice for Synchronization 214 Item 41: Use the Smallest Possible Scope for Lock Handles 221 Item 42: Avoid Calling Unknown Code in Locked Sections 225   Chapter 5: Dynamic Programming 229 Item 43: Understand the Pros and Cons of Dynamic Typing 229 Item 44: Use Dynamic Typing to Leverage the Runtime Type of Generic Type Parameters 238 Item 45: Use DynamicObject or IDynamicMetaObjectProvider for Data-Driven Dynamic Types 242 Item 46: Understand How to Use the Expression API 253 Item 47: Minimize Dynamic Objects in Public APIs 259   Chapter 6: Participate in the Global C# Community 267 Item 48: Seek the Best Answer, Not the Most Popular Answer 267 Item 49: Participate in Specs and Code 269 Item 50: Consider Automating Practices with Analyzers 271   Index 273

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.


Best Sellers


Product Details
  • ISBN-13: 9780134579320
  • Publisher: Pearson Education (US)
  • Publisher Imprint: Addison Wesley
  • Language: English
  • Series Title: Effective Software Development Series
  • Weight: 1 gr
  • ISBN-10: 0134579321
  • Publisher Date: 14 Aug 2017
  • Binding: Digital download
  • No of Pages: 304
  • Sub Title: 50 Specific Ways to Improve Your C#


Similar Products

Add Photo
Add Photo

Customer Reviews

REVIEWS      0     
Click Here To Be The First to Review this Product
More Effective C#: 50 Specific Ways to Improve Your C#(Effective Software Development Series)
Pearson Education (US) -
More Effective C#: 50 Specific Ways to Improve Your C#(Effective Software Development Series)
Writing guidlines
We want to publish your review, so please:
  • keep your review on the product. Review's that defame author's character will be rejected.
  • Keep your review focused on the product.
  • Avoid writing about customer service. contact us instead if you have issue requiring immediate attention.
  • Refrain from mentioning competitors or the specific price you paid for the product.
  • Do not include any personally identifiable information, such as full names.

More Effective C#: 50 Specific Ways to Improve Your C#(Effective Software Development Series)

Required fields are marked with *

Review Title*
Review
    Add Photo Add up to 6 photos
    Would you recommend this product to a friend?
    Tag this Book Read more
    Does your review contain spoilers?
    What type of reader best describes you?
    I agree to the terms & conditions
    You may receive emails regarding this submission. Any emails will include the ability to opt-out of future communications.

    CUSTOMER RATINGS AND REVIEWS AND QUESTIONS AND ANSWERS TERMS OF USE

    These Terms of Use govern your conduct associated with the Customer Ratings and Reviews and/or Questions and Answers service offered by Bookswagon (the "CRR Service").


    By submitting any content to Bookswagon, you guarantee that:
    • You are the sole author and owner of the intellectual property rights in the content;
    • All "moral rights" that you may have in such content have been voluntarily waived by you;
    • All content that you post is accurate;
    • You are at least 13 years old;
    • Use of the content you supply does not violate these Terms of Use and will not cause injury to any person or entity.
    You further agree that you may not submit any content:
    • That is known by you to be false, inaccurate or misleading;
    • That infringes any third party's copyright, patent, trademark, trade secret or other proprietary rights or rights of publicity or privacy;
    • That violates any law, statute, ordinance or regulation (including, but not limited to, those governing, consumer protection, unfair competition, anti-discrimination or false advertising);
    • That is, or may reasonably be considered to be, defamatory, libelous, hateful, racially or religiously biased or offensive, unlawfully threatening or unlawfully harassing to any individual, partnership or corporation;
    • For which you were compensated or granted any consideration by any unapproved third party;
    • That includes any information that references other websites, addresses, email addresses, contact information or phone numbers;
    • That contains any computer viruses, worms or other potentially damaging computer programs or files.
    You agree to indemnify and hold Bookswagon (and its officers, directors, agents, subsidiaries, joint ventures, employees and third-party service providers, including but not limited to Bazaarvoice, Inc.), harmless from all claims, demands, and damages (actual and consequential) of every kind and nature, known and unknown including reasonable attorneys' fees, arising out of a breach of your representations and warranties set forth above, or your violation of any law or the rights of a third party.


    For any content that you submit, you grant Bookswagon a perpetual, irrevocable, royalty-free, transferable right and license to use, copy, modify, delete in its entirety, adapt, publish, translate, create derivative works from and/or sell, transfer, and/or distribute such content and/or incorporate such content into any form, medium or technology throughout the world without compensation to you. Additionally,  Bookswagon may transfer or share any personal information that you submit with its third-party service providers, including but not limited to Bazaarvoice, Inc. in accordance with  Privacy Policy


    All content that you submit may be used at Bookswagon's sole discretion. Bookswagon reserves the right to change, condense, withhold publication, remove or delete any content on Bookswagon's website that Bookswagon deems, in its sole discretion, to violate the content guidelines or any other provision of these Terms of Use.  Bookswagon does not guarantee that you will have any recourse through Bookswagon to edit or delete any content you have submitted. Ratings and written comments are generally posted within two to four business days. However, Bookswagon reserves the right to remove or to refuse to post any submission to the extent authorized by law. You acknowledge that you, not Bookswagon, are responsible for the contents of your submission. None of the content that you submit shall be subject to any obligation of confidence on the part of Bookswagon, its agents, subsidiaries, affiliates, partners or third party service providers (including but not limited to Bazaarvoice, Inc.)and their respective directors, officers and employees.

    Accept

    New Arrivals


    Inspired by your browsing history


    Your review has been submitted!

    You've already reviewed this product!