Idea: Runtime Caching

One advantage functional programming has over imperative programming is that in most functional languages, many of the operations performed are stateless - you pass values in, you get values back, but they never rely on external resources (global variables, static variables, the file system, the registry, etc.). This allows the runtimes of these languages to […]

Snippet: Property Snippets

When you write custom classes in C# as often as I do, you begin to get somewhat sick of having to type out backing fields and property getters/setters for a whole load of properties in a class. I’ve used a number of tools and shortcuts to make this easy, such as the “prop” snippet in […]

Snippet: Event raiser snippet

If you haven’t had chance to look at Code Snippets in Visual Studio 2005, you should. Anyway, I just wanted to share one that I just made to create an event along with the method to raise it:

When you press ‘Enter’ after filling in all the fields, the cursor moves to the “Occurs when” summary […]

List<T> of List<T> Behavior

Pop quiz time. Lets say I have a List<T> of items and I do this:
list[5] = MethodCall();
You can guess there will be an IndexOutOfBoundsException, but the code in MethodCall will be executed first. But what if I had this statement, where I have a List<T> of List<T>?
list[5][0] = MethodCall();
Does the code […]