Practice mode C#

What does a Predicate delegate return?

Correct answer D. bool

Explanation

Predicate represents a method that takes a T and returns a bool, used to test whether an item meets a condition. List methods such as Find, FindAll, Exists and RemoveAll accept a Predicate, as in list.RemoveAll(x => x < 0). It is equivalent in shape to Func, which is what LINQ operators use instead.

Report a problem

Answer checked How we write and check questions

Tip: press A, B, C or D to answer, and N for the next question.

Advertisement

Have a question about this answer?

Your email address will not be published. Required fields are marked *

Links and website addresses are not allowed in comments.