Posts Tagged ‘Lambda Expressions’

C# Acrobatics : Lambdas and Expression Methods as a replacement for NVelocity

I’ve been very quiet recently. (I’m trying to not be so loud, Scott. ) You see, I’ve been writing a lot of ASP.Net code for a site I’m working on. And, to be honest, I’ve been having a lot of trouble. The source code for .Net has been very helpful, and I’ve learnt a lot [...]

More »

Refactoring C# Series: Aggregation of IEnumerable

I was recently reading Programming Ruby: The Pragmatic Programmers’ Guide, Second Edition, and came across this piece of example Ruby code: [1,3,5,7].inject(0) {|sum, element| sum+element} -> 16 [1,3,5,7].inject(1) {|product, element| product*element} -> 105 Inject is a method which acts on an array by aggregating or accumulating the values within that array. It loops through the [...]

More »