Effective C#(第3版):编写高质量C#代码的50条有效方法(英文版)

Effective C#(第3版):编写高质量C#代码的50条有效方法(英文版)
分享
扫描下方二维码分享到微信
打开微信,点击右上角”+“,
使用”扫一扫“即可将网页分享到朋友圈。
2018-06
版次: 1
ISBN: 9787121342653
定价: 89.00
装帧: 其他
开本: 16开
纸张: 胶版纸
11人买过
  • 本书的作者,也是.NET专家Bill Wanger给出我们50条利用C#优点以及特性来写出健壮的,高效的,易于维护的代码的高效法则。同时,本书也反映出了C#语言愈发高级的特性以及关于它的开发社区。本书同时也给出了大量新颖的方法让你能够写出高效可靠的代码。*的第三版囊括了一些泛型和一些其他的语言集成查询(LINQ),还包括了对异常高级实践这一新的章节。 Bill Wagner是世界上最著名的C#开发者之一,是ECMA C#标准委员会的成员。他是Humanitarian Toolbox的主席,连续11年被授予Mcrosoft Regional Director和.NET MVP荣誉称号,最近刚刚被委派到.NET基础顾问理事会任职。

    影印版,无译者…………… 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
  • 内容简介:
    本书的作者,也是.NET专家Bill Wanger给出我们50条利用C#优点以及特性来写出健壮的,高效的,易于维护的代码的高效法则。同时,本书也反映出了C#语言愈发高级的特性以及关于它的开发社区。本书同时也给出了大量新颖的方法让你能够写出高效可靠的代码。*的第三版囊括了一些泛型和一些其他的语言集成查询(LINQ),还包括了对异常高级实践这一新的章节。
  • 作者简介:
    Bill Wagner是世界上最著名的C#开发者之一,是ECMA C#标准委员会的成员。他是Humanitarian Toolbox的主席,连续11年被授予Mcrosoft Regional Director和.NET MVP荣誉称号,最近刚刚被委派到.NET基础顾问理事会任职。

    影印版,无译者……………
  • 目录:
    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
查看详情
相关图书 / 更多
Effective C#(第3版):编写高质量C#代码的50条有效方法(英文版)
EffectiveTeamwork:PracticalLessonsfromOrganizationalResearch
Michael A. West 著
Effective C#(第3版):编写高质量C#代码的50条有效方法(英文版)
Effective数据科学基础设施
[芬兰]维莱·图洛斯(Ville Tuulos)著 郭涛 译
Effective C#(第3版):编写高质量C#代码的50条有效方法(英文版)
Effective TypeScript:精进TypeScript代码的62个实践方法
[美]丹·范德卡姆(Dan Vanderkam);王瑞鹏;董强
Effective C#(第3版):编写高质量C#代码的50条有效方法(英文版)
EffectiveLeadershipinAdventureProgramming
Simon Priest 著
Effective C#(第3版):编写高质量C#代码的50条有效方法(英文版)
Effective软件测试
[荷兰]毛里西奥·阿尼什(Maurício Aniche)著 朱少民 李洁 张元 译
Effective C#(第3版):编写高质量C#代码的50条有效方法(英文版)
Effective Python:编写高质量Python代码的90个有效方法(原书第2版)
[美]布雷特·斯拉特金(Brett Slatkin)
Effective C#(第3版):编写高质量C#代码的50条有效方法(英文版)
Effective C中文版
[美]罗伯特·C. 西科德(Robert C. Seacord)
Effective C#(第3版):编写高质量C#代码的50条有效方法(英文版)
Effective Python:改善Python程序的90个建议 (第2版)(英文版)
[美]Brett Slatkin(布雷特·斯莱特金)
Effective C#(第3版):编写高质量C#代码的50条有效方法(英文版)
EffectiveSupervision:SupportingtheArtandScienceofTeaching
Robert J. Marzano 著
Effective C#(第3版):编写高质量C#代码的50条有效方法(英文版)
EffectiveHelpingInterviewingandCounselingT
Barbara F. Okun、Ricki E. Kantrowitz 著
Effective C#(第3版):编写高质量C#代码的50条有效方法(英文版)
Efficient Linux命令行
[美]丹尼尔·J. 巴雷特(Daniel J. Barrett)马晶慧
Effective C#(第3版):编写高质量C#代码的50条有效方法(英文版)
Effective Cybersecurity 中文版
[美]威廉·斯托林斯(William Stallings)
您可能感兴趣 / 更多
Effective C#(第3版):编写高质量C#代码的50条有效方法(英文版)
宇宙视觉史:从宇宙大爆炸到时间的尽头
[美]查尔斯·刘 著;高爽 译者;[美]马克西姆· 马洛维奇科 绘;未读 出品
Effective C#(第3版):编写高质量C#代码的50条有效方法(英文版)
写出我心 普通人如何通过写作表达自己(平装本)
[美]娜塔莉·戈德堡(Natalie Goldberg)
Effective C#(第3版):编写高质量C#代码的50条有效方法(英文版)
写出我心3 写作疗愈的真正秘密
[美]娜塔莉·戈德堡(Natalie Goldberg)
Effective C#(第3版):编写高质量C#代码的50条有效方法(英文版)
神套路:为什么我们总被带节奏(狂热与网红时代醍醐灌顶之作,教给普通人安身立命的不二法门!)
[美]阿里·阿莫萨维 著;[哥伦比亚]亚历杭德罗·希拉尔多 绘
Effective C#(第3版):编写高质量C#代码的50条有效方法(英文版)
阿伦森自传
[美]埃利奥特·阿伦森(Elliot Aronson) 著;沈捷 译;湛庐文化 出品
Effective C#(第3版):编写高质量C#代码的50条有效方法(英文版)
街头官僚:公共服务中的个人困境
[美]迈克尔·李普斯基(Michael Lipsky)
Effective C#(第3版):编写高质量C#代码的50条有效方法(英文版)
史前至蒙古帝国时期的内欧亚大陆史
[美]大卫·克里斯蒂安 著;潘玲 译;杨建华 校
Effective C#(第3版):编写高质量C#代码的50条有效方法(英文版)
意大利文艺复兴新艺术史
[美]迈克尔·韦恩·科尔 著;[美]斯蒂芬·J·坎贝尔;邵亦杨
Effective C#(第3版):编写高质量C#代码的50条有效方法(英文版)
老人与海 彩图注音版 一二三四年级5-6-7-8-9岁小学生课外阅读经典 儿童文学无障碍有声伴读世界名著童话故事
[美]海明威
Effective C#(第3版):编写高质量C#代码的50条有效方法(英文版)
养育的觉醒:全面激发孩子自驱力,教你如何心平气和做妈妈
[美]凯文·莱曼 著;唐晓璐 译;斯坦威 出品
Effective C#(第3版):编写高质量C#代码的50条有效方法(英文版)
自律我也能做到(全9册)
[美]康妮·科维尔·米勒 著;[阿根廷]维多利亚·阿萨纳利 绘
Effective C#(第3版):编写高质量C#代码的50条有效方法(英文版)
你在等什么?
[美]斯科特·明钦 著;[中]易万 译;[美]马特 ·斐兰 绘