作者:修竹 | 来源:互联网 | 2024-10-10 16:38
This question already has an answer here:
这个问题在这里已有答案:
- Caselessly comparing strings in C# 6 answers
无情地比较C#6答案中的字符串
How to convert the string to uppercase before performing a compare, or is it possible to compare the string by ignoring the case
如何在执行比较之前将字符串转换为大写,或者是否可以通过忽略大小写来比较字符串
if (Convert.ToString(txt_SecAns.Text.Trim()).ToUpper() ==
Convert.ToString(hidden_secans.Value).ToUpper())
10 个解决方案