What is the difference between a lambda expression and a predicate in .NET?

后端 未结 2 879
醉话见心
醉话见心 2021-02-07 09:51

What is the difference between a lambda expression and a predicate in .NET?

2条回答
  •  失恋的感觉
    2021-02-07 10:26

    Predicate defines a set of criteria, while lambda expression is an anonymous function. You can use lambda ex. as a predicate, but that doesn't mean they are the same thing.

    Predicate

    Lambda expression

提交回复
热议问题