More Effective C#——改善C#程序的50个具体办法(英文版)
1推荐 收藏
2.7K阅读
图灵程序设计丛书

More Effective C#——改善C#程序的50个具体办法(英文版)

Bill Wagner (作者)
终止销售
本书针对C# 2.0和 3.0中添加的新特性给出了改善 C#代码的 50条实用建议,其中着重介绍了泛型技术,这是 C# 2.0和 3.0中众多新特性的基石。本书按照建议的主题进行分类,其中每个建议针对某个特定问题进行展开,分析了问题的原因,给出解决的办法。
本书适合各层次 .NET开发人员阅读。
纸质书
¥55.00

出版信息

  • 书  名More Effective C#——改善C#程序的50个具体办法(英文版)
  • 系列书名图灵程序设计丛书
  • 执行编辑关于本书的内容有任何问题,请联系 傅志红
  • 出版日期2009-11-12
  • 书  号978-7-115-21510-9
  • 定  价55.00 元
  • 页  数308
  • 开  本16开
  • 出版状态终止销售
  • 原书名More Effective C#: 50 Specific Ways to Improve Your C#
  • 原书号978-0-321-48589-2

同系列书

  • JavaScript高级程序设计(第4版)

    [美]马特·弗里斯比(Matt Frisbie)   李松峰   译

    本书是JavaScript经典图书的新版。第4版涵盖ECMAScript 2019,全面、深入地介绍了Java...

  • HTTP权威指南

    David Gourley   Brian Totty   Marjorie Sayer   Sailu Reddy   Anshu Aggarwal   陈涓   赵振平   译

    本书是HTTP及其相关核心Web技术方面的权威著作,主要介绍了Web应用程序是如何工作的,核心的因特网协议如何...

  • JavaScript高级程序设计(第3版)

    Nicholas C.Zakas   李松峰   曹力   译

    本书是JavaScript超级畅销书的新版。ECMAScript 5 和HTML5在标准之争中双双胜出,使大量...

  • 计算机科学的基础

    Al Aho   Jeff Ullman   傅尔也   译

    本书全面而详细地阐述了计算机科学的理论基础,从抽象概念的机械化到各种数据模型的建立,用算法、数据抽象等核心思想...

  • Python编程:从入门到实践(第2版)

    埃里克·马瑟斯(Eric Matthes)   袁国忠   译

    本书是针对所有层次Python读者而作的Python入门书。全书分两部分:第一部分介绍用Python编程所必须...

本书特色

C#语言顶级高手的秘籍
业界资深专家智慧和经验的结晶
理论和实践的完美结合

目录

Chapter 1. Working with Generics 4
Item 1. Use Generic Replacements of 1.x Framework API Classes 4
Item 2. Define Constraints That Are Minimal and Sufficient 14
Item 3. Specialize Generic Algorithms Using Runtime Type Checking 19
Item 4. Use Generics to Force Compile-Time Type Inference 26
Item 5. Ensure That Your Generic Classes Support Disposable Type Parameters 32
Item 6. Use Delegates to Define Method Constraints on Type Parameters 36
Item 7. Do Not Create Generic Specialization on Base Classes or Interfaces 42
Item 8. Prefer Generic Methods Unless Type Parameters Are Instance Fields 46
Item 9. Prefer Generic Tuples to Output and Ref Parameters 50
Item 10. Implement Classic Interfaces in Addition to Generic Interfaces 56
Chapter 2. Multithreading in C# 63
Item 11. Use the Thread Pool Instead of Creating Threads 67
Item 12. Use BackgroundWorker for Cross-Thread Communication 74
Item 13. Use lock() as Your First Choice for Synchronization 78
Item 14. Use the Smallest Possible Scope for Lock Handles 86
Item 15. Avoid Calling Unknown Code in Locked Sections 90
Item 16. Understand Cross-Thread Calls in Windows Forms and WPF 93
Chapter 3. C# Design Practices 105
Item 17. Create Composable APIs for Sequences 105
Item 18. Decouple Iterations from Actions, Predicates, and Functions 112
Item 19. Generate Sequence Items as Requested 117
Item 20. Loosen Coupling by Using Function Parameters 120
Item 21. Create Method Groups That Are Clear, Minimal, and Complete 127
Item 22. Prefer Defining Methods to Overloading Operators 134
Item 23. Understand How Events Increase Runtime Coupling Among Objects 137
Item 24. Declare Only Nonvirtual Events 139
Item 25. Use Exceptions to Report Method Contract Failures 146
Item 26. Ensure That Properties Behave Like Data 150
Item 27. Distinguish Between Inheritance and Composition 156
Chapter 4. C# 3.0 Language Enhancements 163
Item 28. Augment Minimal Interface Contracts with Extension Methods 163
Item 29. Enhance Constructed Types with Extension Methods 167
Item 30. Prefer Implicitly Typed Local Variables 169
Item 31. Limit Type Scope by Using Anonymous Types 176
Item 32. Create Composable APIs for External Components 180
Item 33. Avoid Modifying Bound Variables 185
Item 34. Define Local Functions on Anonymous Types 191
Item 35. Never Overload Extension Methods 196
Chapter 5. Working with LINQ 201
Item 36. Understand How Query Expressions Map to Method Calls 201
Item 37. Prefer Lazy Evaluation Queries 213
Item 38. Prefer Lambda Expressions to Methods 218
Item 39. Avoid Throwing Exceptions in Functions and Actions 222
Item 40. Distinguish Early from Deferred Execution 225
Item 41. Avoid Capturing Expensive Resources 229
Item 42. Distinguish Between IEnumerable and IQueryable Data Sources 242
Item 43. Use Single() and First() to Enforce Semantic Expectations on Queries 247
Item 44. Prefer Storing Expression<> to Func<> 249
Chapter 6. Miscellaneous 255
Item 45. Minimize the Visibility of Nullable Values 255
Item 46. Give Partial Classes Partial Methods for Constructors, Mutators, and Event Handlers 261
Item 47. Limit Array Parameters to Params Arrays 266
Item 48. Avoid Calling Virtual Functions in Constructors 271
Item 49. Consider Weak References for Large Objects 274
Item 50. Prefer Implicit Properties for Mutable, Nonserializable Data 277
Index 283
暂无评论!