adspace


Could you explain the difference between func vs action vs predicate?

Answer Posted / Subhash Kumar

In C#, `Func<T>` represents a function that returns a specific type, while `Action<T>` is a delegate that takes in a single argument but doesn't return any value. On the other hand, `Predicate<T>` is a delegate that takes in an object and returns a Boolean result indicating whether a condition has been met.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which namespaces are necessary to create a localized application?

1151


What is an abstract class c#?

978


How to assign Null value to Var?

1073


How do you inherit a class into other class in c#?

1001


Why can't we use a static class instead of singleton?

963


What is expression tree in c#?

1007