我正在尝试使用Linq来确定字符串是否不在数组中.我正在使用的代码是:
if (!stringArray.Any(soughtString.Contains)){ doStuff();}
但它不起作用.显然创建一个foreach循环就足够了,但我想了解为什么这条线不起作用.是的,该文件有using System.Linq;
using System.Linq;
c# linq arrays
arrays ×1
c# ×1
linq ×1