Wednesday, 16 September 2009

C# 4.0 Peek

x
What features of C# 4.0 should you care about?  The main push is the dynamic keyword (see this channel 9 video for more).

Dynamic lookup

Dynamic lookup allows you to write method, operator and indexer calls, property and field accesses, and even object invocations which bypass the C# static type checking and instead gets resolved at runtime.

Named and optional parameters

Parameters in C# can now be specified as optional by providing a default value for them in a member declaration. When the member is invoked, optional arguments can be omitted. Furthermore, any argument can be passed by parameter name instead of position.

COM specific interop features

Dynamic lookup as well as named and optional parameters both help making programming against COM less painful than today. On top of that, however, we are adding a number of other small features that further improve the interop experience.

Variance

It used to be that an IEnumerable wasn’t an IEnumerable. Now it is – C# embraces type safe “co-and contravariance” and common BCL types are updated to take advantage of that.

2 comments:

Anonymous said...

Seems to [b][url=http://bestshopping.hidear.org/#44481]プラダ 長財布[/url][/b]
coddle to the nowadays close[b][url=http://pradas.hidear.org/#44451]グッチ マフラー[/url][/b]
"fraudulence fur" shape [b][url=http://prada.hidear.org/#44391]プラダ 財布 新作[/url][/b]
ambiance, this [b][url=http://pradas.hidear.org/#44451]グッチ マフラー[/url][/b]
band of hand-made Teddy Move Tricks strap, the principal papers[b][url=http://pradas.hidear.org/#44411]プラダ 財布[/url][/b]
simulation fur and leather recycling. Tricks wearing bewildering, fraction unruly, amphibole and Caizhu of medal is reminiscent [b][url=http://pradaoutlet.hidear.org/#44341]プラダ 長財布[/url][/b]
of the ruffian era. Their neck,[b][url=http://pradas.hidear.org/#44371]プラダ 長財布[/url][/b]
back away from and foot of each amalgamating can be active, and hugely of fun. Media published [b][url=http://pradas.hidear.org/#44371]プラダ 長財布[/url][/b]
lone ringing of $ 195.

Anonymous said...

Whats up! You some sort of expert? Nice message.
Can you tell me the best way to subscribe your blog?

Have a look at my website; having trouble getting pregnant the third time