When you're implementing framework code, annotating it with DebuggerStepThroughAttribute is extremely useful because it instructs the debugger to skip over the method or class it is placed on unless there is an explicit breakpoint in the method. This means that in the majority case where you're...
At blinkBox we cache a lot of data. Because we use a distributed cache, it's frequent that we need to get portions of the data from multiple cache nodes, and one way to potentially improve response times is to perform the fetches in parallel. Another way to improve response times is to put any data...
C# does not automatically curry functions, so a function that multiplies two double s together and returns the result must be assigned to a delegate that takes two arguments and returns a result: Func < double , double , double > multiply = (a, b) => a * b; This seems reasonable, but unfortunately...
I don't know for sure, but my guess is because there are at least two implementations with different semantics: // immediate execution public static IEnumerable <T> ForEach<T>( this IEnumerable <T> source, Action <T> action) { foreach ( var item in source) { action(item);...
I've been a bit too busy with work and other things to finish the Linq translation posts, though I will return to them when I get some free time. For now I'll post some other things I had already drafted, and which are probably more interesting to most people anyway. Last year I noted that most...
To get a better understanding of how Lambda functions - and the functional programming capabilities they imply - might be used in C# 3.0, I've started playing around with Scheme (an introductory set of video lectures from MIT are available free to download ). One commonly used functional paradigm...