C# Corner
Tech
News
Videos
Forums
Trainings
Books
Live
More
Interviews
Events
Jobs
Learn
Career
Members
Blogs
Challenges
Certifications
Bounties
Contribute
Article
Blog
Video
Ebook
Interview Question
Collapse
Feed
Dashboard
Wallet
Learn
Achievements
Network
Refer
Rewards
SharpGPT
Premium
Contribute
Article
Blog
Video
Ebook
Interview Question
Register
Login
Difference between Delegate, Function and Predicates
WhatsApp
Selva Ganapathy
12y
22.7
k
0
0
25
Blog
Delegate_Function_Predicate.zip
Delegates
A delegate is a method with a parameter and a return type.
A delegate is a type that safely encapsulates a method.
Delegates are object-oriented, type safe, and secure.
Special Notes
We can’t derive a custom class from the delegates because it is sealed.
Functions:
A function allows you to encapsulate a piece of code and call it from the other parts of your code.
Predicate:
Predicate is a functional construct, providing a convenient way of basically testing if something is true of a given T object.
Predicates are simply delegates that returns booleans.
They're useful when you're searching through a collection of objects and want something specific.
People also reading
Membership not found