Ensure
Ensure
static class with its methods provides functionality for determining if variable's value meets specified conditions and throw exception if it's not.
NotNull
Throws ArgumentNullException
when value of specified variable is null:
NotEmpty
Throws ArgumentNullException when value of specified string variable is null or empty or consists only of white-space characters:
Other methods
Other methods to check variables are listed below:
InRange
GreaterThan
LessThan
Each of them got three different versions for string
, DateTime
and IComparable
values.
Last updated