June 2003
Intermediate to advanced
800 pages
34h 20m
English
You need to provide a mechanism that allows two custom objects to be compared.
Determine what data you want to use for the basis of your comparison, and implement the IComparable interface.
The IComparable interface defines a single CompareTo method that accepts an object for comparison and returns an integer. The integer can take one of the following three values:
Zero, which means the objects are equal.
Less than zero (typically - 1), which means that the current object is less than the object that was supplied as a parameter.
Greater than zero (typically 1), which means that the current object is greater than the object that was supplied as a parameter.
You can evaluate the object contents on your ...
Read now
Unlock full access