which on is better for that purpose and why? tanks :)
I check the first one and test it ; its going to work perfectly but I want to know which one is a right way to do t
List<int> aa = new List<int>();
aa.Add(1);
aa.Add(2);
aa.Add(3);
foreach (var iu in aa)
{
Task.Factory.StartNew(() => StartFollowState(iu));
}
or
List<int> aa = new List<int>();
aa.Add(1);
aa.Add(2);
aa.Add(3);
Parallel.ForEach(lstiu, iu =>
{
Task.Factory.StartNew(() => StartFollowState(iu));
});