图书介绍

More Effective C# 改善C#程序的50个具体办法 英文版2025|PDF|Epub|mobi|kindle电子书版本百度云盘下载

More Effective C# 改善C#程序的50个具体办法 英文版
  • BillWagner编著 著
  • 出版社: 北京:人民邮电出版社
  • ISBN:9787115215109
  • 出版时间:2009
  • 标注页数:297页
  • 文件大小:11MB
  • 文件页数:306页
  • 主题词:C语言-程序设计-英文

PDF下载


点此进入-本书在线PDF格式电子书下载【推荐-云解压-方便快捷】直接下载PDF格式图书。移动端-PC端通用
种子下载[BT下载速度快]温馨提示:(请使用BT下载软件FDM进行下载)软件下载地址页直链下载[便捷但速度慢]  [在线试读本书]   [在线获取解压码]

下载说明

More Effective C# 改善C#程序的50个具体办法 英文版PDF格式电子书版下载

下载的文件为RAR压缩包。需要使用解压软件进行解压得到PDF格式图书。

建议使用BT下载工具Free Download Manager进行下载,简称FDM(免费,没有广告,支持多平台)。本站资源全部打包为BT种子。所以需要使用专业的BT下载软件进行下载。如BitComet qBittorrent uTorrent等BT下载工具。迅雷目前由于本站不是热门资源。不推荐使用!后期资源热门了。安装了迅雷也可以迅雷进行下载!

(文件页数 要大于 标注页数,上中下等多册电子书除外)

注意:本站所有压缩包均有解压码: 点击下载压缩包解压工具

图书目录

Chapter 1 Working with Generics1

Item 1:Use Generic Replacements of 1.x Framework API Classes4

Item 2:Define Constraints That Are Minimal and Sufficient14

Item 3:Specialize Generic Algorithms Using Runtime Type Checking19

Item 4:Use Generics to Force Compile-Time Type Inference26

Item 5:Ensure That Your Generic Classes Support Disposable Type Parameters32

Item 6:Use Delegates to Define Method Constraints on Type Parameters36

Item 7:Do Not Create Generic Specialization on Base Classes or Interfaces42

Item 8:Prefer Generic Methods Unless Type Parameters Are Instance Fields46

Item 9:Prefer Generic Tuples to Output and Ref Parameters50

Item 10:Implement Classic Interfaces in Addition to Generic Interfaces56

Chapter 2 Multithreading in C63

Item 11:Use the Thread Pool Instead of Creating Threads67

Item 12:Use BackgroundWorker for Cross-Thread Communication74

Item 13:Use lock() as Your First Choice for Synchronization78

Item 14:Use the Smallest Possible Scope for Lock Handles86

Item 15:Avoid Calling Unknown Code in Locked Sections90

Item 16:Understand Cross-Thread Calls in Windows Forms and WPF93

Chapter 3 C# Design Practices105

Item 17:Create Composable APIs for Sequences105

Item 18:Decouple Iterations from Actions,Predicates,and Functions112

Item 19:Generate Sequence Items as Requested117

Item 20:Loosen Coupling by Using Function Parameters120

Item 21:Create Method Groups That Are Clear,Minimal,and Complete127

Item 22:Prefer Defining Methods to Overloading Operators134

Item 23:Understand How Events Increase Runtime Coupling Among Objects137

Item 24:Declare Only Nonvirtual Events139

Item 25:Use Exceptions to Report Method Contract Failures146

Item 26:Ensure That Properties Behave Like Data150

Item 27:Distinguish Between Inheritance and Composition156

Chapter 4 C# 3.0 Language Enhancements163

Item 28:Augment Minimal Interface Contracts with Extension Methods163

Item 29:Enhance Constructed Types with Extension Methods167

Item 30:Prefer Implicitly Typed Local Variables169

Item 31:Limit Type Scope by Using Anonymous Types176

Item 32:Create Composable APIs for External Components180

Item 33:Avoid Modifying Bound Variables185

Item 34:Define Local Functions on Anonymous Types191

Item 35:Never Overload Extension Methods196

Chapter 5 Working with LINQ201

Item 36:Understand How Query Expressions Map to Method Calls201

Item 37:Prefer Lazy Evaluation Queries213

Item 38:Prefer Lambda Expressions to Methods218

Item 39:Avoid Throwing Exceptions in Functions and Actions222

Item 40:Distinguish Early from Deferred Execution225

Item 41:Avoid Capturing Expensive Resources229

Item 42:Distinguish Between IEnumerable and IQueryable Data Sources242

Item 43:Use Single() and First() to Enforce Semantic Expectations on Queries247

Item 44:Prefer Storing Expression<>to Func<>249

Chapter 6 Miscellaneous255

Item 45:Minimize the Visibility of Nullable Values255

Item 46:Give Partial Classes Partial Methods for Constructors,Mutators,and Event Handlers261

Item 47:Limit Array Parameters to Params Arrays266

Item 48:Avoid Calling Virtual Functions in Constructors271

Item 49:Consider Weak References for Large Objects274

Item 50:Prefer Implicit Properties for Mutable,Nonserializable Data277

Index283

热门推荐