c# compare string code example
Example 1: compare text c#
string str1 = "London";
string str2 = "London";
str1 == str2; // true
str1.Equals(str2); // true
Example 2: c# string.compare
public static int Compare (string? strA, string? strB);
//Less than zero strA precedes strB in the sort order
//zero strA occurs in the same position as strB in the sort order
//Greater than zero strA follows strB in the sort order