От: | Shmj | ||
Дата: | 29.09.21 10:36 | ||
Оценка: |
S>static async Task Main(string[] args)
S> {
S> Task[] tasks=new Task[1000];
S> for (int i = 0; i < 1000; i++)
S> {
S> int iCopy = i;
S> tasks[i]=AsyncMethod(iCopy);
S> }
S> await Task.WhenAll(tasks);
S> Console.ReadKey();
S> }
S>