delegate void DelegateTest();
DelegateTest delTest;
调用 delTest.Invoke()
和 delTest()
有什么区别?两者都会在当前线程上执行委托,对吧?
Whats the difference between calling delTest.Invoke()
and delTest()
? Both would execute the delegate on the current thread, right?
delTest()
表单是一个编译器助手,在它下面实际上是对 Invoke()
.
The delTest()
form is a compiler helper, underneath it is really a call to Invoke()
.
这篇关于Delegate.Invoke 和 Delegate() 之间的区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!