Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个字符串列表和一个禁止字符串数组。我正在寻找一个 linq 表达式,它选择不包含在禁止字符串数组中的字符串。
IEnumerable<string> except = listOfStrings.Except(forbiddenStrings)
stringlist.Where(x=>!stringarray.Contains(x));