Skip to content

1.3.0

Compare
Choose a tag to compare
@DepthRel DepthRel released this 24 May 20:57
· 54 commits to master since this release

What's new

- Is

  • The Is contract takes a boolean expression value.
    Examples of using:
    string str = "string";
    Contract.Is<ArgumentNullException>(str != null);
    Contract.Is<ArgumentException>(str != "string"); // ArgumentException !!!
  • The IsNot contract takes a boolean expression value and acts back to the contract Is
    Examples of using:
    string str = "string";
    Contract.IsNot<ArgumentNullException>(str != null); // ArgumentNullException !!!
    Contract.IsNot<ArgumentException>(str != "string");