# «YieldExceptionYield» (Solution)

## Answer

```
Foo
1
```

## Links

* [Eric Lippert: Iterator Blocks, Part Five: Push vs Pull](http://blogs.msdn.com/b/ericlippert/archive/2009/07/23/iterator-blocks-part-five-push-vs-pull.aspx)
* [Dan Crevier: Yield and usings - your Dispose may not be called!](http://blogs.msdn.com/b/dancre/archive/2008/03/14/yield-and-usings-your-dispose-may-not-be-called.aspx)
* [StackOverflow: yield return with try catch, how can i solve it](http://stackoverflow.com/questions/5067188/yield-return-with-try-catch-how-can-i-solve-it)
* [StackOverflow: Yield return from a try/catch block](http://stackoverflow.com/questions/7245150/yield-return-from-a-try-catch-block)
* [StackOverflow: Finally block may not be called when enumerating over yielding method](http://stackoverflow.com/questions/19930294/finally-block-may-not-be-called-when-enumerating-over-yielding-method)
* [StackOverflow: Yield return from a try/catch block](http://stackoverflow.com/questions/7245150/yield-return-from-a-try-catch-block)

[Problem](/problembookdotnet/en/linq/yieldexceptionyield-p.md)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://andreyakinshin.gitbook.io/problembookdotnet/en/linq/tryyieldfinally-s.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
