Click here to Skip to main content
15,868,123 members
Articles / Programming Languages / C#
Alternative
Tip/Trick

How to run method in separate thread

Rate me:
Please Sign up or sign in to vote.
4.00/5 (2 votes)
24 Mar 2011CPOL 7.4K   2   1
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)


Written By
Software Developer (Senior) NA
United States United States
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions

 
GeneralDelegateobject.BeginInvoke("Hi, This is Parameter", Program.... Pin
The Vikash!27-Mar-11 19:50
The Vikash!27-Mar-11 19:50 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.