为什么有人想要使用Invoke()(而不是BeginInvoke())?

yee*_*een 1 .net c# delegates invoke begininvoke

我被告知Invoke()类似于普通方法调用...那么为什么人们会选择使用Invoke而不是正常的方法调用?

我尝试在线搜索这个问题,我得到的是使用BeginInvoke()的优点,但使用Invoke()有什么好处?

Dar*_*rov 5

使用BeginInvoke时要异步调用的委托(从线程池中绘制一个线程),并Invoke如果要同步调用它.

  • 当你使用BeginInvoke使用ThreadPool时,不建议长时间运行程序... (3认同)