2
LINQ声明我有一个布尔阵列和一个列表:对泛型列表
bool[ ] searchable
List<T> allData
我想要做的就是像下面
allData.Where(c => searchable[0] && c[0].Contains("das") ||
searchable[1] && c[1].Contains("das") ||
searchable[2] && c[2].Contains("das")
...
);
我如何构建这个LINQ的功能?
'T'是一个数组? – 2013-05-13 08:45:34
你想达到什么目的?什么是'T'?它是'串'吗? – 2013-05-13 08:45:46