string str1 = "Hello"; string str2 = "HELLO"; bool areEqual = string.Compare(str1, str2, StringComparison.OrdinalIgnoreCase) == 0;
string[] words = { "Ångström", "potato", "Vologda", "Beryllium", "sedan" }; Array.Sort(words, StringComparer.CurrentCulture);
string str1 = "voilà"; string str2 = "voila"; bool areEqual = string.Compare(str1, str2, new CultureInfo("fr-FR"), CompareOptions.IgnoreCase) == 0;The CompareOptions class is part of the System.Globalization namespace in the .NET framework.