Programming

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 »

Learning F# – Part 4

Disclaimer: I do not claim credit for the code examples and much of the contents here, these are mostly extracts from the book by Chris Smith, Programming F#: A comprehensive guide for writing simple code to solve complex problems. In fact, if you’re thinking of learning F# and like what you read here, you should …

Learning F# – Part 4 Read More »

Learning F# – Part 3

Disclaimer: I do not claim credit for the code examples and much of the contents here, these are mostly extracts from the book by Chris Smith, Programming F#: A comprehensive guide for writing simple code to solve complex problems. In fact, if you’re thinking of learning F# and like what you read here, you should …

Learning F# – Part 3 Read More »

Learning F# – Part 2

Disclaimer: I do not claim credit for the code examples and much of the contents here, these are mostly extracts from the book by Chris Smith, Programming F#: A comprehensive guide for writing simple code to solve complex problems. In fact, if you’re thinking of learning F# and like what you read here, you should buy …

Learning F# – Part 2 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