Skip to content

Instantly share code, notes, and snippets.

@devoyster
Created January 2, 2012 17:19
Show Gist options
  • Save devoyster/1551423 to your computer and use it in GitHub Desktop.
Save devoyster/1551423 to your computer and use it in GitHub Desktop.
VerifyArgs blog post
public void MyMethod(string str)
{
CheckUtil.NotNullOrEmpty(str, "str");
}
public void MyMethod(string str)
{
Verify.Args(new { str }).NotNull().NotEmpty();
}
// More params
public string MyConcat(string first, string second, int secondCount)
{
Verify.Args(new { first, second }).NotNull().NotEmpty();
Verify.Args(new { secondCount }).Positive();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment