Browse by Tags
All Tags »
C# »
Patterns (RSS)
I don’t know if you’re the same, but when coding away I often find myself wishing for a String.Unformat function – call it the evil twin of String.Format . With String.Format I can build up strings like this; var result = String .Format( "http://{0}:{1}/{2}"
Read More...
Is this a question of taste, or something more serious? [ Warning : this post won’t change your life J ] I found myself writing the following extension method yet again the other day; public static void ForEach<T>( this IEnumerable <T> source,
Read More...
Maybe I’m biased because he’s on the same team as me (ahem, sorry for the plug J ), but I really liked Stuart Leeks ’ post on improving the “Include” method on ObjectQuery<T>. It’s another example, like the MVC Framework he mentions, of how lamba
Read More...
No, I’m not talking about NEANDERTHALS (there’s a joke in there somewhere), but rather a technique that a colleague of mine, Josh Twist , has recently blogged about – “ Avoiding Primitive Obsession to tip developers into the pit of success ”. I’d always
Read More...
Have you used Aspect Oriented Programming (AOP) or Policy Injection? They’re pretty much the same thing. If you haven’t, I’d highly recommend doing some reading, as I believe it is a Software Engineering practice that has moved out of the “fashionable”
Read More...
After being prompted by a friend (or ex-colleague, or drinking buddy, whatever you want to be called J ) I think I owe further explanation about my previous post on generics . Consider these two classes; public class FirstClass <T> { public FirstClass
Read More...
OK, so it isn’t really a sensible name for a pattern. In reality, this post is just about a useful technique to use when developing with generics that initially can feel a little counter intuitive. I’ve found many uses for it, so I think it is worth sharing.
Read More...
Background I’m in the process of writing a small windows application with a very straightforward architecture, for which the only twist is the need to be able to plug in different data providers according to how it is used. This means it must be able
Read More...