看不懂这个方法。求指导

.Net技术 码拜 8年前 (2016-03-03) 768次浏览
       public IEnumerable<T> GetEntities<T>(Func<T, bool> func)
{
var table = this.GetEntitySet<T>();
var temp = table.Where(f => func(f.Value));
var ret = temp.Select(f => f.Value);
return ret;
}
这个方法能不能做条件查询。
(func<T,bool>func)这个是什么?
这个方法调用怎么写,给的参数等,详细点,谢谢
解决方案

55

func<T,bool>func是一个委托。泛型委托。输入的是一个T类型,输出的是一个bool值

CodeBye 版权所有丨如未注明 , 均为原创丨本网站采用BY-NC-SA协议进行授权 , 转载请注明看不懂这个方法。求指导
喜欢 (0)
[1034331897@qq.com]
分享 (0)