Method
CompareTo compares case-sensitive text.
Method
CompareTo declared in the classroom
String
C#
string str1 = "Hallo";
string str2 = "Hsllo";
int result = str1.CompareTo(str2);
// result = -1
C#
string str1 = "Hello";
string str2 = "HELLO";
int result = str1.CompareTo(str2);
// result = -1
C#
string str1 = "Hello";
string str2 = "Hello";
int result = str1.CompareTo(str2);
// result = 0
// identical text