Skip to content

NumericAssertions<TSelf, T> Constructors ​

Base class for assertions on numeric values, and other values that have a zero and a sign such as TimeSpan.

c#
protected NumericAssertions(T value, T zero);

View source

Parameters ​

NameTypeDescription
valueTThe value to assert on.
zeroTThe zero value for T.

Remarks ​

Zero is neither positive nor negative. Values that are not ordered, such as NaN, are not zero, positive or negative.