string comparison in c# ignore case code example
Example 1: c# string equals ignore case
string.Equals(val, "astringvalue", StringComparison.OrdinalIgnoreCase)
Example 2: c# case insensitive compare
string str1 = null;
string str2 = "london";
str1?.Equals(str2, StringComparison.CurrentCultureIgnoreCase); // true