I have a problem in Asp.net C#
I have the code below :
List objectList = new List();
foreach(var item in listItem)
{
object obj = getData (item);
objectList.add(obj);
}
Console.Write("Finish all");
Each time `getData (item);’ fires it takes about 1s;
I want all items in listItem to run at the same time and then execute after foreach finishes the Console.write("Finish all")
How can I do that?
Any idea will be appreciated!
This is good in .net 3.5