public List<String> listStr = new listStr();
public List<String> FindString(Expression<Func<String, bool>> predicate)
{
// return a list that satisfies the predicate
}我正在试着做一个例子来理解如何在c#中使用表达式。你能帮我完成这段代码吗?
发布于 2011-12-20 23:07:22
public List<String> FindString(Expression<Func<String, bool>> predicate)
{
return listStr.Where(predicate.Compile()).ToList();
}https://stackoverflow.com/questions/8577416
复制相似问题