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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T10:12:56+00:00 2026-05-18T10:12:56+00:00

Suppose I want to have a method that passes the BeginInvoke method of an

  • 0

Suppose I want to have a method that passes the BeginInvoke method of an object as a parameter. How would I do that? The call looks like this:

MyRandomMethod(SomeControl.BeginInvoke);

What would the method definition for MyRandomMethod be?

Part of the problem is that BeginInvoke has overloads, so the compiler gets confused as to which one I am try to pass as a parameter. Maybe I need to find a way to say which version of BeginInvoke I am referring to? (Though I would imagine that would be decided by the parameter type)

  • 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-18T10:12:57+00:00Added an answer on May 18, 2026 at 10:12 am

    MyRandomMethod would have to have a parameter with a delegate which matches one of the overloads for SomeControl.BeginInvoke. For example:

    public void MyRandomMethod(Func<Delegate, IAsyncResult> foo)
    

    or

    public void MyRandomMethod(Func<Delegate, object[], IAsyncResult> foo)
    

    (But please don’t overload MyRandomMethod itself with both of these signatures, as otherwise you’re just asking for confusion.)

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

Sidebar

Related Questions

I have a class that contains a member object. I would like to call
Let's suppose I want to create a javascript class/object/function which have a method that
Suppose I have a number of related classes that all have a method like
Suppose, I want to have a link or a button that when user click
Of course most languages have library functions for this, but suppose I want to
Suppose I have a Python class that I want to add an extra property
I am wondering how this would work in MVC 2. Suppose I want to
Suppose I have a function/method F() that takes 3 parameters $A, $B and $C
Suppose I have an int-array and I want to modify it. I know that
I have the following legacy VB6 function that I want to call from C#.

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.