C#

A 20-post collection

Testing for exceptions

Every piece of software should at least have unit tests. Quite a few of these tests will probably be used to see if the method is correctly throwing an exception...

»

Guard your code using LINQ and Reflection

Time to add another class to our Helpers. Defensive programming is very important. Checking that every parameter is correct before working with them is simply a must. The code for...

»

Highly coupled dependencies, a thing of the past.

Programming 101, try to avoid highly coupled dependencies. Luckily, with today's frameworks, this has become a thing of the past. First, what are highly coupled dependencies? To understand this, here's...

»

How to check if periods overlap and/or contain another period?

Checking for overlap can be quite tricky. It's not hard at all to make the whole process far too complicated, resulting in a lot of overhead. Because of this, I...

»

How to make building Strings from dates easy?

While the DateTime object might already have quite some standard formats for its ToString method, it's just not good enough to use directly in a front-end. In some applications, outputting...

»