《Effective C#》电子书下载

Effective C#txt,chm,pdf,epub,mobi下载
作者: Bill Wagner
出版社: Addison-Wesley Professional
副标题: 50 Specific Ways to Improve Your C#
出版年: 2016-12-22
页数: 288
定价: USD 44.99
装帧: Paperback
ISBN: 9780672337871

内容简介  · · · · · ·

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 solution...




作者简介  · · · · · ·

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 developme...



目录  · · · · · ·

Table of Contents
Introduction xiii
Chapter 1: C# Language Idioms 1
Item 1: Prefer Implicitly Typed Local Variables 1
Item 2: Prefer readonly to const 7
Item 3: Prefer the is or as Operators to Casts 12
· · · · · · ()
Table of Contents
Introduction xiii
Chapter 1: C# Language Idioms 1
Item 1: Prefer Implicitly Typed Local Variables 1
Item 2: Prefer readonly to const 7
Item 3: Prefer the is or as Operators to Casts 12
Item 4: Replace string.Format() with Interpolated Strings 19
Item 5: Prefer FormattableString for Culture-Specific Strings 23
Item 6: Avoid String-ly Typed APIs 26
Item 7: Express Callbacks with Delegates 28
Item 8: Use the Null Conditional Operator for Event Invocations 31
Item 9: Minimize Boxing and Unboxing 34
Item 10: Use the new Modifier Only to React to Base Class Updates 38
Chapter 2: .NET Resource Management 43
Item 11: Understand .NET Resource Management 43
Item 12: Prefer Member Initializers to Assignment Statements 48
Item 13: Use Proper Initialization for Static Class Members 51
Item 14: Minimize Duplicate Initialization Logic 53
Item 15: Avoid Creating Unnecessary Objects 61
Item 16: Never Call Virtual Functions in Constructors 65
Item 17: Implement the Standard Dispose Pattern 68
Chapter 3: Working with Generics 77
Item 18: Always Define Constraints That Are Minimal and Sufficient 79
Item 19: Specialize Generic Algorithms Using Runtime Type Checking 85
Item 20: Implement Ordering Relations with IComparable<T> and IComparer<T> 92
Item 21: Always Create Generic Classes That Support Disposable Type Parameters 98
Item 22: Support Generic Covariance and Contravariance 101
Item 23: Use Delegates to Define Method Constraints on Type Parameters 107
Item 24: Do Not Create Generic Specialization on Base Classes or Interfaces 112
Item 25: Prefer Generic Methods Unless Type Parameters Are Instance Fields 116
Item 26: Implement Classic Interfaces in Addition to Generic Interfaces 120
Item 27: Augment Minimal Interface Contracts with Extension Methods 126
Item 28: Consider Enhancing Constructed Types with Extension Methods 130
Chapter 4: Working with LINQ 133
Item 29: Prefer Iterator Methods to Returning Collections 133
Item 30: Prefer Query Syntax to Loops 139
Item 31: Create Composable APIs for Sequences 144
Item 32: Decouple Iterations from Actions, Predicates, and Functions 151
Item 33: Generate Sequence Items as Requested 154
Item 34: Loosen Coupling by Using Function Parameters 157
Item 35: Never Overload Extension Methods 163
Item 36: Understand How Query Expressions Map to Method Calls 167
Item 37: Prefer Lazy Evaluation to Eager Evaluation in Queries 179
Item 38: Prefer Lambda Expressions to Methods 184
Item 39: Avoid Throwing Exceptions in Functions and Actions 188
Item 40: Distinguish Early from Deferred Execution 191
Item 41: Avoid Capturing Expensive Resources 195
Item 42: Distinguish between IEnumerable and IQueryable Data Sources 208
Item 43: Use Single() and First() to Enforce Semantic Expectations on Queries 212
Item 44: Avoid Modifying Bound Variables 215
Chapter 5: Exception Practices 221
Item 45: Use Exceptions to Report Method Contract Failures 221
Item 46: Utilize using and try/finally for Resource Cleanup 225
Item 47: Create Complete Application-Specific Exception Classes 232
Item 48: Prefer the Strong Exception Guarantee 237
Item 49: Prefer Exception Filters to catch and re-throw 245
Item 50: Leverage Side Effects in Exception Filters 249
Index 253
· · · · · · ()

下载地址

发布者:齐麟子宙

文件说明:zip / 解压密码:yiquhai.com

迅雷下载:您需要先后,才能查看

网盘下载:您需要先后,才能查看

关于内容:内容自于互联网,如果发现有违规内容请联系管理员删除!

作者: 齐麟子宙

该用户很懒,还没有介绍自己。

37 条评论

发表评论

  1. 李贝拉ahhh 李贝拉ahhh说道:
    1#

    以前买过

  2. 身后未平息的风 身后未平息的风说道:
    2#

    怎么说呢,感觉这本书涉及的方方面面太多

  3. 杨小宝cancer 杨小宝cancer说道:
    3#

    颠覆了本人固有浅薄的世界观、价值观

  4. 茶妹小屋 茶妹小屋说道:
    4#

    好好好好好

  5. 显示更多