65.9K
CodeProject is changing. Read more.
Home

How to run method in separate thread

emptyStarIconemptyStarIconemptyStarIconemptyStarIconemptyStarIcon

0/5 (0 vote)

Mar 24, 2011

CPOL
viewsIcon

4817

You may actualy skip delegate types when assigning a method to execute: private void DoLongOperation( ) { // long processing } Thread thr = new Thread(DoLongOperation); thr.Start( );

You may actualy skip delegate types when assigning a method to execute:
 
 private void DoLongOperation( ) {
  // long processing
 } 

 Thread thr = new Thread(DoLongOperation);
 thr.Start( );