Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3440504
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T08:26:23+00:00 2026-05-18T08:26:23+00:00

With real examples and their use, can someone please help me understand: When do

  • 0

With real examples and their use, can someone please help me understand:

  1. When do we need a Func<T, ..> delegate?
  2. When do we need an Action<T> delegate?
  3. When do we need a Predicate<T> delegate?
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T08:26:23+00:00Added an answer on May 18, 2026 at 8:26 am

    The difference between Func and Action is simply whether you want the delegate to return a value (use Func) or not (use Action).

    Func is probably most commonly used in LINQ – for example in projections:

     list.Select(x => x.SomeProperty)
    

    or filtering:

     list.Where(x => x.SomeValue == someOtherValue)
    

    or key selection:

     list.Join(otherList, x => x.FirstKey, y => y.SecondKey, ...)
    

    Action is more commonly used for things like List<T>.ForEach: execute the given action for each item in the list. I use this less often than Func, although I do sometimes use the parameterless version for things like Control.BeginInvoke and Dispatcher.BeginInvoke.

    Predicate is just a special cased Func<T, bool> really, introduced before all of the Func and most of the Action delegates came along. I suspect that if we’d already had Func and Action in their various guises, Predicate wouldn’t have been introduced… although it does impart a certain meaning to the use of the delegate, whereas Func and Action are used for widely disparate purposes.

    Predicate is mostly used in List<T> for methods like FindAll and RemoveAll.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

With real examples and their use, can someone please help me understand: How to
Can anyone provide some real examples as to how best to keep script files
Examples of what you can do. (defmethod some-fn ((num real)) (print an integer)) (defmethod
Can someone give me a real life example ( in programming, C#) of needing
What are some common , real world examples of using the Builder Pattern? What
I am trying to learn OOP. The so called 'real world' examples in the
Please give me a real time example for singleton pattern . Different threads accessing
I can find some articles on how to use them but I can't seem
Most examples of the use of fixed point combinators involve functions that take integers
Can someone explain to me what each SunSpider subtest actually checks and give a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.