《CLR via C#》第四版的新增内容(转)
What's new in CLR via C#, 4th Edition as compared to the 3rd Edition
与第三版相比,《CLR via C#》第四版有什么新内容?
The 4th edition of my CLR via C# book is coming out next month and you can order it here. The new edition is updated for Visual Studio 2012, .NET 4.5, and C# 5; there is also some coverage of Windows 8. As the book focuses on the CLR & C#, the majority of the book is the same as in the previous edition since little has changed from the developer's perspective. As always, I do review each and every chapter, I apply any reported errata improvements, fix any bugs, typos, or improve wording if a reader reported that something was confusing. I also update version numbers, screen shots, and any current thinking that differs from thinking in the past.
《CLR via C#》第四版将会在下个月(2013.1)发布,你可以从这里买到。这个版本基于Visual Studio 2012, .NET 4.5和C# 5进行了更新,书中还有一些内容涉及了Windows 8。与之前的版本一样,这本书主要关注CLR和C#语言,并针对开发者的期望做了一些小的更改。我一如既往地对每一章每一节进行了检查,更新了所有勘误表中的内容,修正了很多逻辑错误和印刷错误,同时对读者反馈的书中比较令人困惑的表述进行了修改。我还把版本号、截图,所有我当前所想的,与以前不同的想法进行了更新。
However, I have also made some significant enhancements to the 4th edition. I have rewritten the Garbage Collection chapter so the material is updated and presented in more organized fashion. Second, the chapter on Reflection has been rewritten because Microsoft has redesigned the Reflection APIs and the new API is the one that will survive into the future. The old Reflection API still exists for backward compatibility but it will eventually fade away (I removed all content related to the old API). The new Reflection API MUST be used when building Windows Store Apps. The new Reflection APIs have affected other chapters too (such as the delegates chapter where I talk about how to dynamically create delegate instances at runtime).
除此之外,我还在第四版中增加了一些比较重要的东西。我重写了“垃圾回收”章节,现在这一章的相关内容经过更新整理后变得更加新潮了。第二,“反射”章节也已经经过重写,因为Microsoft已经重新设计了反射相关的API,并且我们以后使用的将会是这些新的API。旧的API仍将为了向后兼容性而继续存在,不过它们会逐渐消逝(我已经移除了所有有关旧API的内容)。当你编写Windows Store应用时必须要使用新的反射API。相应的,本书中其他使用新的反射API的地方也进行更新(例如“委托”这一章节中我谈论的“怎样在运行时使用反射动态创建委托的实例”)。
Speaking of Windows Store Apps, I have updated many of the chapters with considerations when building Windows Store Apps. And, I have added a brand new chapter entitled "Interoperating with WinRT Components" that describes how to consume WinRT components from C#. The chapter also shows how to produce C# WinRT components which can be consumed from other languages (such as JavaScript or native C++).
提到Windows Store应用,我在考虑创建Windows Store应用的场景下更新了多个章节的内容。并且,我还加入了一个标题为“与WinRT组件进行交互”的全新章节,描述了怎样在C#中使用WinRT组件。这一章还展示了如何创建可以被其他语言(例如JavaScript或非托管C++)所使用的C# WinRT组件。
The only language feature new to C# 5.0 is the support for a new and simplified asynchronous programming model. This model is very similar to the model I produced years ago via my AsyncEnumerator class which has been freely available as part of my Power Threading library. To address C#'s asynchronous programming model, I have completely rewritten the "I/O Bound Asynchronous Operations" chapter. OK, C# has introduced another tiny language feature via Callee custom attributes and I also show how to use them in the same chapter.
C# 5.0中唯一的语言新特性是一个新的易于使用的异步编程模型。这个模型与我在多年以前创建的Power Threading库中的AsyncEnumerator类十分相似。为了专注于新的C#异步编程模型,我已经彻底重新编写了“I/O限制的异步操作”这一章节。然后,C#还通过Callee自定义属性引入了另外一个小的语言特性,我会在这一章中介绍怎么使用它。
When the book goes to the printer, I will post the source code on the Wintellect website.
当这本书送到印刷厂之后,我会在Wintellect网站中发布书中的相关源代码。
渣翻译by Kaedei
原文地址http://www.wintellect.com/cs/blogs/jeffreyr/archive/2012/10/19/what-s-new-in-clr-via-c-4th-edition-as-compared-to-the-3rd-edition.aspx
本文转自http://blog.sina.com.cn/s/blog_58c506600101ia6l.html
与第三版相比,《CLR via C#》第四版有什么新内容?
The 4th edition of my CLR via C# book is coming out next month and you can order it here. The new edition is updated for Visual Studio 2012, .NET 4.5, and C# 5; there is also some coverage of Windows 8. As the book focuses on the CLR & C#, the majority of the book is the same as in the previous edition since little has changed from the developer's perspective. As always, I do review each and every chapter, I apply any reported errata improvements, fix any bugs, typos, or improve wording if a reader reported that something was confusing. I also update version numbers, screen shots, and any current thinking that differs from thinking in the past.
《CLR via C#》第四版将会在下个月(2013.1)发布,你可以从这里买到。这个版本基于Visual Studio 2012, .NET 4.5和C# 5进行了更新,书中还有一些内容涉及了Windows 8。与之前的版本一样,这本书主要关注CLR和C#语言,并针对开发者的期望做了一些小的更改。我一如既往地对每一章每一节进行了检查,更新了所有勘误表中的内容,修正了很多逻辑错误和印刷错误,同时对读者反馈的书中比较令人困惑的表述进行了修改。我还把版本号、截图,所有我当前所想的,与以前不同的想法进行了更新。
However, I have also made some significant enhancements to the 4th edition. I have rewritten the Garbage Collection chapter so the material is updated and presented in more organized fashion. Second, the chapter on Reflection has been rewritten because Microsoft has redesigned the Reflection APIs and the new API is the one that will survive into the future. The old Reflection API still exists for backward compatibility but it will eventually fade away (I removed all content related to the old API). The new Reflection API MUST be used when building Windows Store Apps. The new Reflection APIs have affected other chapters too (such as the delegates chapter where I talk about how to dynamically create delegate instances at runtime).
除此之外,我还在第四版中增加了一些比较重要的东西。我重写了“垃圾回收”章节,现在这一章的相关内容经过更新整理后变得更加新潮了。第二,“反射”章节也已经经过重写,因为Microsoft已经重新设计了反射相关的API,并且我们以后使用的将会是这些新的API。旧的API仍将为了向后兼容性而继续存在,不过它们会逐渐消逝(我已经移除了所有有关旧API的内容)。当你编写Windows Store应用时必须要使用新的反射API。相应的,本书中其他使用新的反射API的地方也进行更新(例如“委托”这一章节中我谈论的“怎样在运行时使用反射动态创建委托的实例”)。
Speaking of Windows Store Apps, I have updated many of the chapters with considerations when building Windows Store Apps. And, I have added a brand new chapter entitled "Interoperating with WinRT Components" that describes how to consume WinRT components from C#. The chapter also shows how to produce C# WinRT components which can be consumed from other languages (such as JavaScript or native C++).
提到Windows Store应用,我在考虑创建Windows Store应用的场景下更新了多个章节的内容。并且,我还加入了一个标题为“与WinRT组件进行交互”的全新章节,描述了怎样在C#中使用WinRT组件。这一章还展示了如何创建可以被其他语言(例如JavaScript或非托管C++)所使用的C# WinRT组件。
The only language feature new to C# 5.0 is the support for a new and simplified asynchronous programming model. This model is very similar to the model I produced years ago via my AsyncEnumerator class which has been freely available as part of my Power Threading library. To address C#'s asynchronous programming model, I have completely rewritten the "I/O Bound Asynchronous Operations" chapter. OK, C# has introduced another tiny language feature via Callee custom attributes and I also show how to use them in the same chapter.
C# 5.0中唯一的语言新特性是一个新的易于使用的异步编程模型。这个模型与我在多年以前创建的Power Threading库中的AsyncEnumerator类十分相似。为了专注于新的C#异步编程模型,我已经彻底重新编写了“I/O限制的异步操作”这一章节。然后,C#还通过Callee自定义属性引入了另外一个小的语言特性,我会在这一章中介绍怎么使用它。
When the book goes to the printer, I will post the source code on the Wintellect website.
当这本书送到印刷厂之后,我会在Wintellect网站中发布书中的相关源代码。
渣翻译by Kaedei
原文地址http://www.wintellect.com/cs/blogs/jeffreyr/archive/2012/10/19/what-s-new-in-clr-via-c-4th-edition-as-compared-to-the-3rd-edition.aspx
本文转自http://blog.sina.com.cn/s/blog_58c506600101ia6l.html
有关键情节透露