| |
Sign In
The .NET Compact Framework 2.0 now supports asynchronous execution of a delegate on a user interface thread. Unlike the .NET Compact Framework 1.0 that supports only the Control.Invoke method (which synchronously executes a delegate on a control's owning thread), the .NET Compact Framework 2.0 provides Control.BeginInvoke that asynchronously executes a delegate on the control's owning thread. The Control.EndInvoke method is also provided. When called, the EndInvoke method returns the results of an asynchronous operation.
using System.Threading;private void Button_Click(etc){ ThreadPool.QueueUserWorkItem(new WaitCallback(this.DoSomeWork));}private void DoSomeWork(object o){ ...}
Remember Me