Increase productivity by useful Ruby language features available in C# .NET.
Ruby:
5.times { puts "Hello" }
10.times { |i| puts "Hello #{i}" }
C#:
5.Times( () => Console.WriteLine( "Hello" ) );
10.Times( i => Console.WriteLine( "Hello, {0}", i ) );
Ruby:
"hello".each { |ch| print ch }
"message".each_with_index { |ch,i| puts "#{i} is #{ch}" }
C#:
"hello".Each( ch => Console.Write( ch ) );
"message".Each( (ch, i) => Console.WriteLine( "{0} is {1}", i, ch ) );