For the complete documentation index, see llms.txt. This page is also available as Markdown.

«LifeAfterYield» (Задача)

Что выведет следующий код?

IEnumerable<string> Foo()
{
  yield return "Bar";
  Console.WriteLine("Baz");
}
void Main()
{
  foreach (var str in Foo())
    Console.Write(str);
}

Решение

Last updated