开始调用和方法调用者 [英] Begin Invoke and Method Invoker

查看:78
本文介绍了开始调用和方法调用者的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

public void Form1_Load(object sender,EventArgs e)

{

test(sender,e);

}



public void test(object o,EventArgs< imap_r_u> e)

{

this.BeginInvoke(new MethodInvoker(delegate) ()

{

i我在这个地方写代码

}

);

}





i我没有用上面的语法定义委托

i我没有定义方法调用者上面的语法。



请解释一下上面的方法。开始调用完成之后它会去哪个语句?

解决方案

Code Project中的好文章供您阅读; 异步方法调用 [ ^ ]

public void Form1_Load(object sender, EventArgs e)
{
test(sender,e);
}

public void test (object o,EventArgs<imap_r_u> e)
{
this.BeginInvoke(new MethodInvoker(delegate()
{
i am writing code in this place
}
);
}


i am not defining the delegate in above syntax
i am not defining the method invoker in above syntax.

please explain the above method. After begin invoke completed to which statement it will go?

解决方案

Nice article right here in Code Project for you to read; Asynchronous Method Invocation[^]


这篇关于开始调用和方法调用者的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆