Functional programming with Linq – IEnumerable.Aggregate

As I was learning functional programming with F# I came across the List.reduce function which iterates through a list and builds up an accumulator value by running another function against each element in the list. Back to the more familiar C# territory, LINQ has introduced some functional features to C# and one of these is …

Functional programming with Linq – IEnumerable.Aggregate Read More »

Buzzword Buster – DDD

Definition: Domain Driven Design (DDD) is an approach to software design which puts the focus on the problem domain and provides a structure for making design decisions to accelerates software development for complicated domains. The key components in DDD include: Domain: the subject area to which your program is applied Model: abstractions that describe aspects …

Buzzword Buster – DDD Read More »

Throwing exceptions the right way

Use ReSharper? Notice every time ReSharper sees code like this: it complains, and tells you to get rid of the ex for the reason ‘Exception rethrow possibly intended’? The reason ReSharper is warning you about an ‘exception rethrow’ is that when you rethrow an exception it replaces the stack trace of the original exception with …

Throwing exceptions the right way Read More »

Feb 11th – Scott Guthrie Talks Shop IV

This is an upcoming web seminar with Scott Gu, organised by the good folks at Linked .Net User Group (http://www.lidnug.org). I attended one of their previous presentations with Joe Albahari on the new features in C# 4.0 (the recorded presentation can be viewed here) and thoroughly enjoyed that! A FREE web seminar with someone as …

Feb 11th – Scott Guthrie Talks Shop IV Read More »

Threading – Using ReaderWriterLockSlim

When dealing with concurrency/threading issues in .Net, the normal approach is to use lock() to lock a dedicated sync object like this: This is an efficient, simple and well proven way to get thread-safety in .Net and is probably all you’ll ever need in your project. However, as this approach ensures only one thread can …

Threading – Using ReaderWriterLockSlim Read More »

LINQ – choosing between Concat() and Union()

In Linq To Objects, there are two ways you can join two sequences together, using either Concat() or Union(), and as I was wondering how the two differs I came across this post: http://weblogs.asp.net/fbouma/archive/2009/03/04/choose-concat-over-union-if-possible.aspx The main thing to take away from this article is: “If you care about the duplicates, Union() is necessary. However, in …

LINQ – choosing between Concat() and Union() Read More »

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close