Compares this instance to a specified object and returns an integer that indicates whether the value of this instance is less than, equal to, or greater than the value of the object.
![]()
A signed number indicating the relative values of this instance and value.
Less than zero This instance is less than value.
Zero This instance is equal to value.
Greater than zero This instance is greater than value.
-or-
value is null.
Type Reason ArgumentException value is not a short and is not a null reference.
An short, regardless of its value, is considered greater than a null reference.
The value parameter must be null or an instance of short; otherwise, an exception is thrown.