Archive

Posts Tagged ‘C# 4.0’

That Unfortunate Interaction Between Multicast Delegates and Contravariance in C# 4.0

March 1, 2010 Leave a comment

About seven months ago, a little while after VS2010 Beta 1 came out, I was thinking about events, and to what extent the typical eventing pattern in .NET is necessary or unnecessary. Would it be okay to use Action as the delegate type, for example?
Read more…

Advertisements
Categories: C# 4.0, delegates Tags: ,

Zip and Tuple Neatness

October 23, 2009 3 comments

In BCL 4.0, there’s still no Unfold method (boooo), but at least there’s a Zip extension method to keep us warm as winter draws on.

I played with it thusly:
Read more…

Categories: BCL, C# 4.0 Tags: ,

What’s Wrong With C# 4.0’s dynamic Keyword, and How I Think It Should Be Fixed

February 25, 2009 2 comments

Update: Exactly what I want, already implemented, complete with caching of the call site. Also, Microsoft’s Mads Torgersen responds to this suggestion here.

C# 4.0 proposes to add the dynamic keyword to the language. There are a few problems with it:

Read more…

Categories: C#, C# 4.0, dynamic Tags: , ,