Created
January 2, 2012 17:19
-
-
Save devoyster/1551423 to your computer and use it in GitHub Desktop.
VerifyArgs blog post
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void MyMethod(string str) | |
{ | |
CheckUtil.NotNullOrEmpty(str, "str"); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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