string.Equals 比较2个字符串是否相同忽略大小写 bool res = string.Equals(str1, str2, StringComparison.CurrentCultureIgnoreCase)