When the string class CompareTo() method is used to compare two strings, it would provide additional information to the user in the form of an integer value. This method would compare a certain string to another object. The two objects are converted to a Unicode value in order to be compared. If they are equal, then the output would be 0 or else it would return a negative or a positive value.