有没有什么办法可以修复这个语句?
if (sAwnser == ("hello" || "Hello" || "hi" || "Hi" || "hey" || "Hey" || "Hay" || "hey"))
{
}
它出现了错误
Operator '||' cannot be applied to operands of type 'string' and 'string'
如果有人能帮忙,将不胜感激。
hi
、Hi
、hI
和HI
都可以匹配。 - user2674389