Created
September 7, 2014 15:56
-
-
Save dariusz-wozniak/45d72f78bccb9d57e5af to your computer and use it in GitHub Desktop.
Code Contracts: Contract.Requires
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 int Add(int a, int b) | |
{ | |
Contract.Requires<ArgumentOutOfRangeException>(a >= 0); | |
Contract.Requires<ArgumentOutOfRangeException>(b >= 0); | |
// ... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment