Browse by Tags

All Tags » C# 4.0 (RSS)
The CLR’s exception handling facilities provide for protected blocks (“try”) one can associate a handler with. There are four kinds of handlers, and exactly one can be associated with a protected block (but nesting can be used to associate multiple handlers...
Posted by bart | 24 comment(s)
Introduction Today, a colleague and I were playing with new C# 4.0 and BCL 4.0 features, me trying (and succeeding I think) to convince my co-worker about the merits of LINQ and its peripheral technologies. Users of Visual Studio 2010 Beta 2 may have...
Posted by bart | 10 comment(s)
I promise, it will be a (relatively) short post this time. You all know the foreach statement in C#, don’t you? Think twice before you answer and tell me exactly how the following works: foreach ( int x in src) { // Do something with x. } Got an answer...
Posted by bart | 8 comment(s)
Introduction Sunday morning, time for another episode of the Crazy Sundays series. Again one in the category with risk for exploding brains , but that’s what we like, don’t we? This time around, we’re going to have a look at the type free lambda calculus...
Introduction In my last post, Expression Trees, Take Two – Introducing System.Linq.Expressions v4.0 , I showed how to the extensions to the LINQ expression trees API opens up for full-blown statement trees including support for assignment, control flow...
Posted by bart | 13 comment(s)
Last time around in this series, I promised to talk about generic co- and contra-variance. So that’s why we’re here today. In this post I’ll explain the theoretical concepts behind these fancy-sounding terms, look at the runtime’s take on it, show how...
Posted by bart | 19 comment(s)
Filed under:
Why this is not a C# 4.0 blog post… By now most of you have probably heard about the dynamic capabilities that will be added to the C# 4.0 language. Search engines start to fill their databases with lots of descriptions of and discussions about the feature...
Posted by bart | 5 comment(s)
After named parameters and optional parameters , we'll take a little breadth and deviate a bit from the language specifics to present a new LINQ operator: Zip. Just like a zipper zips two streams of materials together, LINQ's Zip operator can...
Posted by bart | 24 comment(s)
Filed under: , ,
In the previous episode of this feature focus series we talked about optional parameters . Today we'll cover another feature introduced in C# 4.0, named parameters. One of the most applicable places for optional and named parameters is when dealing...
Posted by bart | 157 comment(s)
Filed under:
Welcome to the first post in my new C# 4.0 Feature Focus series. Today we'll start by taking a look at optional parameters, a long-standing request from the community that made it to C# 4.0. By itself, the feature is definitely useful but in conjunction...
Posted by bart | 135 comment(s)
Filed under:
More Posts Next page »