Do you know what I find a greatest addition to C# 4.0 / .NET 4.0?

  • Dynamic? Well, it really did enable some interesting options (especially for F# and MVC), but it wasn’t a gamechanger really
  • Covariance and Contravariance? Seriously, do you feel the difference?
  • WF 4.0? Ok, it was a big overhaul, but it still lacks some “feature identity” - noone uses that as it’s hard to identify any scenario it’s really helpful (and / or necessary) with
  • MEF? Oh yeah, that’s some quality - but there are some other IoC containers (yes, I realize that MEF is something more) available, so you have valuable alternatives
  • TPL? Bullseye.
TPL is something I’ve been really waiting for and I didn’t get disappointed.
TPL (Task Parallel Library) is a new subset of .NET API, that aids you with a new way to create parallel, multi-threaded applications in a simplier, clearer and supposedly more efficient way, but MOST IMPORTANT - it sets the foundation for async / await asynchronous programming in .NET 4.5 that is a bridge between asynchronous paradigm of creating applications (especially user interfaces) in WinRT (Windows 8 Metro)!
The more and more I use it, the harder it is to go back and implement anything in .NET 3.5. And I find traditional, synchronous (blocking) user interfaces more and more annoying (try to compare WM5.5 user experience with WP7.5 “Mango” apps).
  1. You can find some basic details on TPL at http://msdn.microsoft.com/en-us/library/dd460717.aspx
  2. For intro on async/await, go for http://msdn.microsoft.com/en-us/library/hh191443%28v=vs.110%29.aspx
  3. And if you have 4 extra hours to spare, I stronly encourage you to get familiar with very comprehensive approach (it covers both TPL and async/await) to asynchronous programming in .NET, that can be found at Pluralsight: http://www.pluralsight-training.net/microsoft/Courses/TableOfContents/tpl-async 
Share this post