c# - Passing BeginInvoke as a parameter -


suppose want have method passes begininvoke method of object parameter. how that? call looks this:

myrandommethod(somecontrol.begininvoke); 

what method definition myrandommethod be?

part of problem begininvoke has overloads, compiler gets confused 1 try pass parameter. maybe need find way version of begininvoke referring to? (though imagine decided parameter type)

myrandommethod have have parameter delegate matches 1 of overloads somecontrol.begininvoke. example:

public void myrandommethod(func<delegate, iasyncresult> foo) 

or

public void myrandommethod(func<delegate, object[], iasyncresult> foo) 

(but please don't overload myrandommethod both of these signatures, otherwise you're asking confusion.)


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -