The typical means of comparing two objects is to pass a reference to one object as an argument to a method invoked on the other. This method performs such a comparison. The first keyword is an operator to indicate the kind of comparison to be carried out. The second argument is a reference to the second TextRange object that it is to be compared with.
The following keywords can be passed in the first argument as string values:
The values returned by this method are -1, 0 or 1. These indicate whether the first value is before, coincident with or after the second value. The operator dictates which values are to be tested.