Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles / Languages / C#

How to run method in separate thread

4.00/5 (2 votes)
24 Mar 2011CPOL 7.8K  
Much easier to go for async invoke.new MethodInvoker(MyMethod).BeginInvoke(null, null);We can use the suitable overload in case of parameters/callback methods.Note: MethodInvoker is available inside the System.Windows.Forms name space. You can create your own delegates also.
Much easier to go for async invoke.
new MethodInvoker(MyMethod).BeginInvoke(null, null);


We can use the suitable overload in case of parameters/callback methods.

Note: MethodInvoker is available inside the System.Windows.Forms name space. You can create your own delegates also.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)