P
P
ProblemBook.NET
Search…
⌃K
P
P
ProblemBook.NET
Search…
⌃K
ProblemBook.NET
LANGS
Задачник.NET
Math
Oop
ValueTypes
Strings
Linq
«QueryAfterRemove» (Решение)
«ClosureAndVariable» (Решение)
«QueryAfterRemove» (Задача)
«ClosureAndVariable» (Задача)
«EnumerableToArray» (Решение)
«QueryWithInc» (Решение)
«EnumerableToArray» (Задача)
«QueryWithInc» (Задача)
«LifeAfterYield» (Решение)
“YieldExceptionYield” (Решение)
«LifeAfterYield» (Задача)
«ExceptionYieldYield» (Решение)
«ClosureAndForeach» (Решение)
«TryYieldFinally» (Задача)
«ClosureAndFor» (Решение)
«ExceptionYieldYield» (Задача)
«YieldExceptionYield» (Решение)
«ClosureAndForeach» (Задача)
«ClosureAndFor» (Задача)
«YieldExceptionYield» (Задача)
Multithreading
Summary
Введение
ProblemBook.NET
Attribution-NonCommercial-NoDerivatives 4.0 International
Powered By GitBook

«TryYieldFinally» (Задача)

Что выведет следующий код?
public static IEnumerable<int> GetSmallNumbers()
{
try
{
yield return 1;
yield return 2;
}
finally
{
Console.WriteLine("Foo");
}
}
void Main()
{
Console.WriteLine(GetSmallNumbers().First());
}
​Решение​
Previous
«ClosureAndForeach» (Решение)
Next
«ClosureAndFor» (Решение)
Last modified 3yr ago
Copy link