delegate method begininvoke

when i review code ,  follow  puzzle me,
 action.BeginInvoke(importer, criticalOperation, ImportAsyncCompleted, criticalOperation);
how do it  ?

after use   google& baidu , i get some message very useful, as follow:

"Invoking methods asynchronously using delegates.

BeginInvoke(parameter list,AsyncCallback callback,object state);
EndInvoke(IAsyncResult result);

When BeginInvoke finishes,.net calls the supplied callback function inside   which you are supposed to call the EndInvoke method.

AsyncCallback:delegate that points to the callback function that will be   called when the method completes.

object state:You can pass some state information to the method iva state parameter, this is usualful in case you want to pass some information other than method parameter"

posted on 2011-09-29 18:22  子虚乌有  阅读(283)  评论(0)    收藏  举报