.NET Rubyisms

I'm still really intrigued by these extension methods + lambda expressions. Check out the following snippet.

public static void times(this int i, Action a)
{
   for (int j = 0; j < i; j++)            
      a(j);              
}

Now I can replace a standard for loop

for(int i=0;i<10;i++){
   doSomething();
}

With this

10.times(i=>doSomething());

I'm not entirely sure how useful it is, but I'm still exploring the new features.