Top Stories published by theburningmonk.com in February of 2011

Eric Lippert on the decision to omit Enumerable.ForEach

Found another interesting post on Eric Lippert’s blog, this one explain the rationales behind why there’s no built-in Enumerable.ForEach extension method, one which myself and no doubt many others had decided to implement ourselves.


Creating a count down meter with CSS3 and JQuery

Whilst working on the MathDOJO mini game one of the neat little things I tried to do was implement a time meter which steadily counts down and changes colour (from green to yellow to glowing red) as it approaches 0:


Interesting observation on C# 4’s optional parameter

The other day I had an interesting observation on the optional parameters in C# 4, whereby if you specify a parameter as optional on an interface you don’t actually have to make that parameter optional on any implementing class:


Converting List using covariance

I saw an interesting use of covariance today, consider an interface IMyClass and an implementing class MyClass:

1: public interface IMyClass { }
2:
3: public class MyClass : IMyClass { }