图书 | Effective C#(编写高质量C#代码的50条有效方法第3版英文版)/原味精品书系 |
内容 | 内容推荐 本书的作者,也是.NET专家Bill Wanger给出我们50条利用C#优点以及特性来写出健壮的,高效的,易于维护的代码的高效法则。同时,本书也反映出了C#语言愈发不错的特性以及关于它的开发社区。本书同时也给出了大量新颖的方法让你能够写出高效可靠的代码。近期新的第三版囊括了一些泛型和一些其他的语言集成查询(LINQ),还包括了对异常不错实践这一新的章节。 作者简介 比尔·瓦格纳(Bill Wagner),世界知名的C#专家,也是ECMA C#标准委员会成员。他在Humanitarian Toolbox项目中担任主管,并荣获微软公司.NET MVP称号长达11年,很近开始在.NET Foundation AdvisoryCouncil任职。Wagner在工作中与各种规模的公司合作,帮助这些创业公司或企业改进软件开发流程,并培养软件开发团队。目前,他是微软.NET核心内容团队的员工,写过很多与C#语言及.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: Speize 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 Speization 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 Parameters157 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#(编写高质量C#代码的50条有效方法第3版英文版)/原味精品书系 |
副书名 | |
原作名 | |
作者 | (美)比尔·瓦格纳 |
译者 | |
编者 | |
绘者 | |
出版社 | 电子工业出版社 |
商品编码(ISBN) | 9787121342653 |
开本 | 16开 |
页数 | 268 |
版次 | 1 |
装订 | 平装 |
字数 | 355 |
出版时间 | 2018-07 |
首版时间 | 2018-07 |
印刷时间 | 2018-07 |
正文语种 | 英 |
读者对象 | 普通大众 |
适用范围 | |
发行范围 | 公开发行 |
发行模式 | 实体书 |
首发网站 | |
连载网址 | |
图书大类 | |
图书小类 | |
重量 | 466 |
CIP核字 | 2018109368 |
中图分类号 | TP312.8 |
丛书名 | |
印张 | 17.5 |
印次 | 1 |
出版地 | 北京 |
长 | 234 |
宽 | 185 |
高 | 12 |
整理 | |
媒质 | 图书 |
用纸 | 普通纸 |
是否注音 | 否 |
影印版本 | 原版 |
出版商国别 | CN |
是否套装 | |
著作权合同登记号 | 图字01-2017-3548 |
版权提供者 | 由Pearson Education Inc.授权 |
定价 | 89.00 |
印数 | |
出品方 | |
作品荣誉 | |
主角 | |
配角 | |
其他角色 | |
一句话简介 | |
立意 | |
作品视角 | |
所属系列 | |
文章进度 | |
内容简介 | |
作者简介 | |
目录 | |
文摘 | |
安全警示 | 适度休息有益身心健康,请勿长期沉迷于阅读小说。 |
随便看 |
|
兰台网图书档案馆全面收录古今中外各种图书,详细介绍图书的基本信息及目录、摘要等图书资料。