13
12
2004
New Code Project article on argument exceptions
If you compose in the key of C#, you may want to check out my new article at The Code Project.
Achieve greater consistency in raising argument exceptions with very little effort. This utility class (which is covered by nearly 600 included NUnit test cases!) makes it possible to evaluate and raise exceptions on passed-in parameters, using a single line of code.
A side note about some things I hope are useful (beyond the meat of the code itself):
- The source code makes extensive use of C#’s XML documentation feature
- The article includes an MSDN-style HTML Help file automatically generated from the XML using the excellent NDoc tool
- The article discusses why developers should care about automated unit testing
- The article walks you through installing the best automated testing tool currently available for .NET and then running my included unit tests
Enjoy! 