От: | alexzzzz | ||
Дата: | 19.04.21 21:04 | ||
Оценка: |
using System;
using System.Collections.Generic;
using System.Threading;
foreach (var value in Generate())
{
Console.WriteLine(value);
}
IEnumerable<int> Generate()
{
while (true)
{
Thread.Sleep(1000);
yield return DateTime.Now.Second;
}
}