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 8123219
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T06:06:27+00:00 2026-06-06T06:06:27+00:00

i got a code for calling a function until meet the condition but i

  • 0

i got a code for calling a function until meet the condition but i am not in very advance stage so code which i got not at all clear to me. here i will submit the code i got…please some one discuss about how the code works in detail.

public static void RunToFirstMatch<T>(Func<T, bool> sentry, params Func<T>[] functions)
{
     functions.Any(f => match(f()));
}

The code is called as follows

RunToFirstMatch(v => (v >= 5), Step1, ()=>Step2(1,1), Step3, Step4, ()=>0+1);

RunToFirstMatch function take 2 argument but when this function is getting called then many argument is passing….i just do not understand about the calling of the function. please discuss thanks.

  • 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-06-06T06:06:30+00:00Added an answer on June 6, 2026 at 6:06 am

    The second argument, params Func<T>[] functions, actually means “allow many Func<T>s to be passed as subsequent arguments, and present them in an array called functions.” This is caused by the params keyword.

    Thus when you call

    RunToFirstMatch(v => (v >= 5), Step1, ()=>Step2(1,1), Step3, Step4, ()=>0+1)
    

    you get

    sentry = v => (v >= 5); /* or should this be called match? */
    functions = new Func<T>[]
        {
            Step1,
            ()=>Step2(1,1),
            Step3,
            Step4,
            ()=>0+1
        };
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i got a code which can be used to notify user when all images
I have got a crash at calling function Clearrendertargetview(). Below is the code: HWND
I've got an onclick event which is calling a function, passing the current div:
I've got a quite strange problem here. I'm calling some simple code via Ajax.Updater:
I have got code like this var challegneListener; $(document).ready(function(){ var challegneListener = setInterval(challengeListenerBot(),5000); });
Got some code that is not mine and its producing this warning atm: iehtmlwin.cpp(264)
I know it's possible to call the calling function, but is it possible to
I finally got my code to reference the ruby-alsa library , but I'm stuck
I refactored some code, and now I get this error when calling a function.
I've got a very large and mature C++ code base that I'm trying to

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.