EffectiveC#:编写高质量C#代码的条有效方法9pdf下载pdf下载

EffectiveC#:编写高质量C#代码的条有效方法9百度网盘pdf下载

作者:
简介:本篇主要提供EffectiveC#:编写高质量C#代码的条有效方法9pdf下载
出版社:博远慧达图书专营店
出版时间:2018-06
pdf下载价格:0.00¥

免费下载


书籍下载


内容介绍

   图书基本信息
图书名称 Effective C#(第3版):编写高质量C#代码的50条有效方法(英文版)(博文视点出品)
作者 Bill,Wagner(比尔・瓦格纳),Bill,
定价 89.00元
出版社 电子工业出版社
ISBN 9787121342653
出版日期 2018-06-01
字数
页码 284
版次 1
装帧 平装
开本 16开
商品重量 0.4Kg

   内容简介

本书的作者,也是.NET专家Bill Wanger给出我们50条利用C#优点以及特性来写出健壮的,高效的,易于维护的代码的高效法则。同时,本书也反映出了C#语言愈发高级的特性以及关于它的开发社区。本书同时也给出了大量新颖的方法让你能够写出高效可靠的代码。新的第三版囊括了一些泛型和一些其他的语言集成查询(LINQ),还包括了对异常高级实践这一新的章节。


   作者简介

Bill Wagner是世界上的C#开发者之一,是ECMA C#标准委员会的成员。他是HumanitariaToolbox的主席,连续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 Bong and Unbong ..................................................................... 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 Initializatiofor Static Class Members ....................................... 51
Item 14: Minimize Duplicate InitializatioLogic ........................................................ 53
Item 15: Avoid Creating Unnecessary Objects ............................................................ 61
Item 16: Never Call Virtual Functions iConstructors ................................................ 65
Item 17: Implement the Standard Dispose Patter....................................................... 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 oType Parameters ............. 107
Item 24: Do Not Create Generic SpecializatiooBase Classes or Interfaces .......... 112
Item 25: Prefer Generic Methods Unless Type Parameters Are Instance Fields ....... 116
Item 26: Implement Classic Interfaces iAdditioto Generic Interfaces ................. 120
Item 27: Augment Minimal Interface Contracts with ExtensioMethods ................ 126
Item 28: Consider Enhancing Constructed Types with ExtensioMethods .............. 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: LooseCoupling by Using FunctioParameters......................................... 157
Item 35: Never Overload ExtensioMethods ............................................................ 163
Item 36: Understand How Query Expressions Map to Method Calls ........................ 167
Item 37: Prefer Lazy Evaluatioto Eager EvaluatioiQueries .............................. 179
Item 38: Prefer Lambda Expressions to Methods ...................................................... 184
Item 39: Avoid Throwing Exceptions iFunctions and Actions ............................... 188
Item 40: Distinguish Early from Deferred Executio................................................ 191
Item 41: Avoid Capturing Expensive Resources ........................................................ 195
Item 42: Distinguish betweeIEnumerable and IQueryable Data Sources ............... 208
Item 43: Use Single and First to Enforce Semantic Expectations oQueries ...... 212
Item 44: Avoid Modifying Bound Variables .............................................................. 215
Chapter 5 ExceptioPractices ................................................................ 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 ExceptioClasses .......................... 232
Item 48: Prefer the Strong ExceptioGuarantee ........................................................ 237
Item 49: Prefer ExceptioFilters to catch and re-throw ............................................ 245
Item 50: Leverage Side Effects iExceptioFilters .................................................. 249
Index .......................................................................................................... 253


   编辑推荐
适读人群 :对C#有浓厚兴趣或者有面向对象编程经验的读者或者是想在C#高级编程走的更高的程序开发者。

.NET专家Bill Wanger倾情力作

More Effective C# 升级版本

应用开发者常备书目

深度理解C#编程语言



   文摘

   序言