Difference between Thread and Task ?

  • Thread starter Thread starter Sudip_inn
  • Start date Start date
S

Sudip_inn

Guest
i could call my routine by thread like this way but i saw people use Task to call routine run in backgrounnd thread isnread of using Thread class.
so what is the advantage of using task class instead of thread class?


Thread t = new Thread
(
() =>
{

ExportToExcel();
}
);
// thread background settings
t.IsBackground = true;

t.Start();

Continue reading...
 
Back
Top