本书针对C# 2.0和3.0中添加的新特性给出了改善C#代码的50条实用建议,其中着重介绍了泛型技术,这是C# 2.0和3.O中众多新特性的基石。本书按照建议的主题进行分类,其中每个建议针对某个特定问题进行展开,分析了问题的原因,给出解决的办法。
本书适合各层次.NET开发人员阅读。
网站首页 软件下载 游戏下载 翻译软件 电子书下载 电影下载 电视剧下载 教程攻略
书名 | More Effective C#(改善C#程序的50个具体办法英文版)/微软技术系列/图灵程序设计丛书 |
分类 | |
作者 | (美)瓦格纳 |
出版社 | 人民邮电出版社 |
下载 | ![]() |
简介 | 编辑推荐 本书针对C# 2.0和3.0中添加的新特性给出了改善C#代码的50条实用建议,其中着重介绍了泛型技术,这是C# 2.0和3.O中众多新特性的基石。本书按照建议的主题进行分类,其中每个建议针对某个特定问题进行展开,分析了问题的原因,给出解决的办法。 本书适合各层次.NET开发人员阅读。 内容推荐 C#语言已经成为目前功能最强大的通用语言之一,近几年的几次升级更是令C#编程世界发生了极大的改变。本书是Effective C#的续作,秉承了Effective经典系列的卓越风格,用真实的代码示例,通过清晰、贴近实际和简明的阐述,以条目形式为广大程序员提供了凝聚业界经验结晶的专家建议。 本书中,著名.NET专家Bill Wagner围绕C# 2.0和3.0中的新特性给出了实用的建议,涉及泛型、多线程编程、设计实践、C#3.0语言增强、LINQ、可空类型等主题。讲述了如何在开发中使用这些新语言特性。如何避免误用所造成的影响。书中每个条目自成一体,针对使用C}}时的某个特定问题,帮助你以最佳的方式切换至C#3.0。通过阅读本书,读者完全可以举一反三,将其中许多建议应用到自己的日常编程工作中。 目录 Chapter 1 Working with Generics Item 1: Use Generic Replacements of 1.x Framework API Classes Item 2: Define Constraints That Are Minimal and Sufficient Item 3: Specialize Generic Mgorithms Using Runtime Type Checking Item 4: Use Generics to Force Compile-Time Type Inference Item 5: Ensure That Your Generic Classes Support Disposable Type Parameters Item 6: Use Delegates to Define Method Constraints on Type Parameters Item 7: Do Not Create Generic Specialization on Base Classes or Interfaces Item 8: Prefer Generic Methods Unless Type Parameters Are Instance Fields Item 9: Prefer Generic Tuples to Output and Ref Parameters Item 10: Implement Classic Interfaces in Addition to Generic Interfaces Chapter 2 Multithreading in fi# Item 11: Use the Thread Pool Instead of Creating Threads Item 12: Use BackgroundWorker for Cross-Thread Communication Item 13: Use lock() as Your First Choice for Synchronization Item 14: Use the Smallest Possible Scope for Lock Handles Item 15: Avoid Calling Unknown Code in Locked Sections Item 16: Understand Cross-Thread Calls in Windows Forms and WPF Chapter 3 C# Design Practices Item 17: Create Composable APIs for Sequences Item 18: Decouple Iterations from Actions, Predicates, and Functions Item 19: Generate Sequence Items as Requested Item 20: Loosen Coupling by Using Function Parameters Item 21: Create Method Groups That Are Clear, Minimal, and Complete Item 22: Prefer Defining Methods to Overloading Operators Item 23: Understand How Events Increase Runtime Coupling Among Objects Item 24: Declare Only Nonvirtual Events Item 25: Use Exceptions to Report Method Contract Failures Item 26: Ensure That Properties Behave Like Data Item 27: Distinguish Between Inheritance and Composition Chapter 4 C# 3.0 Language Enhancements Item 28: Augment Minimal Interface Contracts with Extension Methods Item 29: Enhance Constructed Types with Extension Methods Item 30: Prefer Implicitly Typed Local Variables Item 31: Limit Type Scope by Using Anonymous Types Item 32: Create Composable APIs for External Components Item 33: Avoid Modifying Bound Variables Item 34: Define Local Functions on Anonymous Types Item 35: Never Overload Extension Methods Chapter 5 Working with LINQ Item 36: Understand How Query Expressions Map to Method Calls Item 37: Prefer Lazy Evaluation Queries Item 38: Prefer Lambda Expressions to Methods Item 39: Avoid Throwing Exceptions in Functions and Actions Item 40: Distinguish Early from Deferred Execution Item 41: Avoid Capturing Expensive Resources Item 42: Distinguish Between IEnumerable and IQueryable Data Sources Item 43: Use Single() and First() to Enforce Semantic Expectations on Queries Item 44: Prefer Storing Expression<> to Func<> Chapter 6 Miscellaneous Item 45: Minimize the Visibility of Nullable Values Item 46: Give Partial Classes Partial Methods for Constructors, Mutators, and Event Handlers Item 47: Limit Array Parameters to Params Arrays Item 48: Avoid Calling Virtual Functions in Constructors Item 49: Consider Weak References for Large Objects Item 50: Prefer Implicit Properties for Mutable, Nonserializahle Data Index |
随便看 |
|
霍普软件下载网电子书栏目提供海量电子书在线免费阅读及下载。