ITPub博客

首页 > > > c# 扩展方法问题

c# 扩展方法问题

作者:z_paul 时间:2019-11-14 13:54:23 0 删除 编辑
public static class EnumerableExtensions
    {

        public static T Find<T>(this IEnumerable<T> enumerable, Predicate<T> match)
        {
           return enumerable.Find(match);
        }
 
    }

调用:

ErpDic.Value.AsParallel().Find(x => x.code == code)

ErpDic是个  private Lazy<List<sys_dict_common>> ErpDic;

为什么这个 扩展方法find 进入了无限递归呢?不明白。

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/75/viewspace-3150308/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2019-07-17

  • 博文量
    151
  • 访问量
    6019