.NET Blog
Free. Cross-platform. Open source. A developer platform for building all your apps.
Featured posts

Announcing .NET 11
.NET 11 is here with C# 15, faster developer tools, runtime and library improvements, and new capabilities for web, mobile, desktop, and AI apps.
Latest posts
Paper :: TPL Performance Improvements in .NET 4.5
We invested a lot of time into making parallel programming “just faster” for .NET 4.5. You’ve already seen some neat tricks to ConcurrentDictionary. There’s a lot more to say about improving the performance of the Task Parallel Library, and Joe Hoag has a written an excellent paper on the subject:TPL Performance Improvements in .NET 4.5The paper examines some of the changes made to TPL in .NET 4.5, compares times for selected operations in .NET 4 vs .NET 4.5, and makes some general “best practices” recommendations for those interested in using TPL performantly in .N...
Crafting a Task.TimeoutAfter Method
Imagine that you have a Task handed to you by a third party, and that you would like to force this Task to complete within a specified time period. However, you cannot alter the “natural” completion path and completion state of the Task, as that may cause problems with other consumers of the Task. So you need a way to obtain a copy or “proxy” of the Task that will either (A) complete within the specified time period, or (B) will complete with an indication that it had timed out. In this blog post, I will show how one might go about implementing a Task.TimeoutAfter method to support this scenario. The signature o...
Exception Handling in TPL Dataflow Networks
A “dataflow block” is represented by a class implementing the IDataflowBlock interface. The state of a dataflow block is represented by the state of its IDataflowBlock.Completion Task, which itself has a Status property. When a dataflow block is in active state, meaning that it is currently doing processing or may do more processing in the future, its Completion task will be in a non-final state, such as TaskStatus.WaitingForActivation. Once the dataflow block has completed all of its processing, either successfully or due to failure or cancellation, the Completion task’s Status will return one of the three value...
ConcurrentDictionary Performance Improvements in .NET 4.5
ConcurrentDictionary is a popular concurrent data structure that was introduced in .NET 4. In the .NET 4.5 release, ConcurrentDictionary gets two performance improvements. One optimization is related to the way ConcurrentDictionary avoids torn reads and writes. To explain the background, all reference types and some value types are guaranteed to be read and written atomically by the Common Language Runtime, as defined in section 12.6.6 of the ECMA CLI specification. However, large value types such as System.Guid are not read and written atomically. So, if a thread writes values into a System.Guid field while ano...
Updated Async CTP
In April, we released the Async CTP Refresh, and since then we've seen fantastic adoption of the technology. We've also seen the technology landscape evolve. Windows Phone 7.5, aka "Mango", was released. Silverlight 5 has had both a Beta and an RC release. And there have been multiple patches to Visual Studio and the .NET Framework. All of these have led to some issues with the Async CTP, which many users have run into and let us know about on the forums. To address all of these problems, we've just released v3 of the Async CTP. The installer has been tested with all known V...
Update 4.0.2 for the Microsoft .NET Framework 4
Update (2017): See .NET Framework Releases to learn about newer releases. This release is now unsupported. With .NET 4, we’ve focused on bringing certain features to market through updates without having to wait for the .NET 4.5 release. This post covers what the latest platform update has to offer. Vivek Mishra from the .NET Servicing team authored the following. -- Brandon The .NET Framework team is excited to announce that Update 4.0.2 for the Microsoft .NET Framework 4 is now available. This is a platform update that offers a set of additional functionality on top of the .NET Framework 4. In this release, we...
Update 4.0.2 for the Microsoft .NET Framework 4
Update (2017): See .NET Framework Releases to learn about newer releases. This release is now unsupported. With .NET 4, we’ve focused on bringing certain features to market through updates without having to wait for the .NET 4.5 release. This post covers what the latest platform update has to offer. Vivek Mishra from the .NET Servicing team authored the following. -- Brandon The .NET Framework team is excited to announce that Update 4.0.2 for the Microsoft .NET Framework 4 is now available. This is a platform update that offers a set of additional functionality on top of the .NET Framework 4. In this release, we...
Update 4.0.2 for the Microsoft .NET Framework 4
Update (2017): See .NET Framework Releases to learn about newer releases. This release is now unsupported. With .NET 4, we’ve focused on bringing certain features to market through updates without having to wait for the .NET 4.5 release. This post covers what the latest platform update has to offer. Vivek Mishra from the .NET Servicing team authored the following. -- Brandon The .NET Framework team is excited to announce that Update 4.0.2 for the Microsoft .NET Framework 4 is now available. This is a platform update that offers a set of additional functionality on top of the .NET Framework 4. In this release, we...
Update 4.0.2 for the Microsoft .NET Framework 4
Update (2017): See .NET Framework Releases to learn about newer releases. This release is now unsupported. With .NET 4, we’ve focused on bringing certain features to market through updates without having to wait for the .NET 4.5 release. This post covers what the latest platform update has to offer. Vivek Mishra from the .NET Servicing team authored the following. -- Brandon The .NET Framework team is excited to announce that Update 4.0.2 for the Microsoft .NET Framework 4 is now available. This is a platform update that offers a set of additional functionality on top of the .NET Framework 4. In this release, we...