A few days a go i was going through my bookmarks, and came accross this post on the GetPaint.Net blog about using a fluent interface for parameter validation.
After reading the article, I tried the code out at home, and was very impressed. Not only does it read well, but also does not create any objects untill a piece of validation fails. Very nice.
However i wanted to use this at work, and this presented me with a problem. Work only has VS2005, which means no extension methods, which are the crux of how this validation method works.
I spent a while trying to see if it was possible to keep the fluent interface and not instantiate any objects until something fails. In the end i settled for this method which only creates one object.
The rest of the code used is identical to Rick Brewster's Article, so head over there to see it in all its (well written) glory.