Previous Topic: CompareTo Method—Compares two strings(upto the indicated length)Next Topic: Arguments


Purpose

Compares two strings and returns a negative if the first instance is less than the second; a positive if the first instance is greater than the second; 0 if the two instances are equal. Only the characters up to the indicated length are compared. All characters after that point are ignored.

The lengths do not have to be identical, they will still compare as long as characters in the extra length area of the larger string are spaces.