読者です 読者をやめる 読者になる 読者になる

書籍紹介: CLR via C#, Third Edition

.NET Book

CLR via C#, Third Edition

CLR via C#, Third Edition


第3版の季節がやって参りました.
そもそもそんな本は知らんがな,という人ももしかしたらいらっしゃるかもしれませんが,『プログラミングMicrosoft .NET Framework』の原書と言えば多くの .NET 開発者には通じるのではないかと思います*1
さて,今回の更新の目玉のひとつが,.NET Framework 4 / C# 4.0 対応というところらしいですが,まあぶっちゃけ第2版を持っている人はいつもの定期更新てところでしょうか.私も,細かい更新とかはとりあえず手元に届いてから調べるつもりです.
なお,著者のブログで更新内容については告知されています.また記事のコメントでのやりとりでは,「eBook 版の予定もある」と書かれています*2.用心深い方や,邦訳版でとりあえず間に合っている人で,発売日に買うかどうか迷っている方は,その辺りが参考になるでしょう.

  • Part I – CLR Basics
    • Chapter 1-The CLR’s Execution Model
      • Added about discussion about C#’s /optimize and /debug switches and how they relate to each other.
    • Chapter 2-Building, Packaging, Deploying, and Administering Applications and Types
      • Improved discussion about Win32 manifest information and version resource information.
    • Chapter 3-Shared Assemblies and Strongly Named Assemblies
      • Added discussion of TypeForwardedToAttribute and TypeForwardedFromAttribute.
  • Part II – Designing Types
    • Chapter 4-Type Fundamentals
      • No new topics.
    • Chapter 5-Primitive, Reference, and Value Types
      • Enhanced discussion of checked and unchecked code and added discussion of new BigInteger type. Also added discussion of C# 4.0’s dynamic primitive type.
    • Chapter 6-Type and Member Basics
      • No new topics.
    • Chapter 7-Constants and Fields
      • No new topics.
    • Chapter 8-Methods
      • Added discussion of extension methods and partial methods.
    • Chapter 9-Parameters
      • Added discussion of optional/named parameters and implicitly-typed local variables.
    • Chapter 10-Properties
      • Added discussion of automatically-implemented properties, properties and the Visual Studio debugger, object and collection initializers, anonymous types, the System.Tuple type and the ExpandoObject type.
    • Chapter 11-Events
      • Added discussion of events and thread-safety as well as showing a cool extension method to simplify the raising of an event.
    • Chapter 12-Generics
      • Added discussion of delegate and interface generic type argument variance.
    • Chapter 13-Interfaces
      • No new topics.
  • Part III – Essential Types
    • Chapter 14-Chars, Strings, and Working with Text
      • No new topics.
    • Chapter 15-Enums
      • Added coverage of new Enum and Type methods to access enumerated type instances.
    • Chapter 16-Arrays
      • Added new section on initializing array elements.
    • Chapter 17-Delegates
      • Added discussion of using generic delegates to avoid defining new delegate types. Also added discussion of lambda expressions.
    • Chapter 18-Attributes
      • No new topics.
    • Chapter 19-Nullable Value Types
      • Added discussion on performance.
  • Part IV – CLR Facilities
    • Chapter 20-Exception Handling and State Management
      • This chapter has been completely rewritten. It is now about exception handling and state management. It includes discussions of code contracts and constrained execution regions (CERs). It also includes a new section on trade-offs between writing productive code and reliable code.
    • Chapter 21-Automatic Memory Management
      • Added discussion of C#’s fixed state and how it works to pin objects in the heap. Rewrote the code for weak delegates so you can use them with any class that exposes an event (the class doesn’t have to support weak delegates itself). Added discussion on the new ConditionalWeakTable class, GC Collection modes, Full GC notifications, garbage collection modes and latency modes. I also include a new sample showing how your application can receive notifications whenever Generation 0 or 2 collections occur.
    • Chapter 22-CLR Hosting and AppDomains
      • Added discussion of side-by-side support allowing multiple CLRs to be loaded in a single process. Added section on the performance of using MarshalByRefObject-derived types. Substantially rewrote the section on cross-AppDomain communication. Added section on AppDomain Monitoring and first chance exception notifications. Updated the section on the AppDomainManager class.
    • Chapter 23-Assembly Loading and Reflection
      • Added section on how to deploy a single file with dependent assemblies embedded inside it. Added section comparing reflection invoke vs bind/invoke vs bind/create delegate/invoke vs C#’s dynamic type.
    • Chapter 24-Runtime Serialization
      • This is a whole new chapter that was not in the 2nd Edition.
  • Part V – Threading
    • Chapter 25-Threading Basics
      • Whole new chapter motivating why Windows supports threads, thread overhead, CPU trends, NUMA Architectures, the relationship between CLR threads and Windows threads, the Thread class, reasons to use threads, thread scheduling and priorities, foreground thread vs background threads.
    • Chapter 26-Performing Compute-Bound Asynchronous Operations
      • Whole new chapter explaining the CLR’s thread pool. This chapter covers all the new .NET 4.0 constructs including cooperative cancelation, Tasks, the aralle class, parallel language integrated query, timers, how the thread pool manages its threads, cache lines and false sharing.
    • Chapter 27-Performing I/O-Bound Asynchronous Operations
      • Whole new chapter explaining how Windows performs synchronous and asynchronous I/O operations. Then, I go into the CLR’s Asynchronous Programming Model, my AsyncEnumerator class, the APM and exceptions, Applications and their threading models, implementing a service asynchronously, the APM and Compute-bound operations, APM considerations, I/O request priorities, converting the APM to a Task, the event-based Asynchronous Pattern, programming model soup.
    • Chapter 28-Primitive Thread Synchronization Constructs
      • Whole new chapter discusses class libraries and thread safety, primitive user-mode, kernel-mode constructs, and data alignment.
    • Chapter 29-Hybrid Thread Synchronization Constructs
      • Whole new chapter discussion various hybrid constructs such as ManualResetEventSlim, SemaphoreSlim, CountdownEvent, Barrier, ReaderWriterLock(Slim), OneManyResourceLock, Monitor, 3 ways to solve the double-check locking technique, .NET 4.0’s Lazy and LazyInitializer classes, the condition variable pattern, .NET 4.0’s concurrent collection classes, the ReaderWriterGate and SyncGate classes.

The plan is that this book WILL have an eBook available for it. I do not know more of the details just now.

(第2版に引き続き,第3版の翻訳も行われると良いなぁと願う人々が踏むべき過去の) 参考リンク

*1:著者である Jeffrey Richter 氏の名は,『Advanced Windows 第5版 上』『Advanced Windows 第5版 下』の原書の著者として,Win32 時代からの開発者にはお馴染みですね.

*2:Jeffrey Richter 氏と言えば,『なんで Advanced Windows の(原書の)電子ブック版は無くなったの? - NyaRuRuの日記』なんて話も過去にはあっただけに,『CLR via C#, Third Edition』に eBook 版の予定があるというのは嬉しいニュースですね.