I have async method that returns string (From web).
async Task<string> GetMyDataAsync(int dataId);
I have:
Task<string>[] tasks = new Task<string>[max];
for (int i = 0; i < max; i++)
{
tasks[i] = GetMyDataAsync(i);
}
How can I append result of each of this tasks to StringBuilder
?
I would like to know how to do it
A) In order of task creation
B) In order that tasks finish
How can I do it?