Any .NET Fluent Argument checking libraries out there?
I ended up using CuttingEdge Conditions, found on Codeplex.
eg.
// Check all preconditions:
Condition.Requires(id, "id")
.IsNotNull() // throws ArgumentNullException on failure
.IsInRange(1, 999) // ArgumentOutOfRangeException on failure
.IsNotEqualTo(128); // throws ArgumentException on failure
nice :)
Try FluentValidation
Or FluentValidation for .NET 2.0