Top "Yield-return" questions

yield return is a C# construct that's used to create an iterator block, which makes implementing IEnumerable<T> easier.

yield return statement inside a using() { } block Disposes before executing

I've written my own custom data layer to persist to a specific file and I've abstracted it with a custom …

c# .net-2.0 idisposable using yield-return
How to yield return inside anonymous methods?

Basically I have an anonymous method that I use for my BackgroundWorker: worker.DoWork += ( sender, e ) => { foreach ( var effect …

c# .net backgroundworker anonymous-methods yield-return
Can I implement yield return for IEnumerable functions in VB.NET?

Possible Duplicate: Yield In VB.NET In C#, when writing a function that returns an IEnumerble<>, you can …

vb.net ienumerable iterator yield-return
Parallel.Foreach + yield return?

I want to process something using parallel loop like this : public void FillLogs(IEnumerable<IComputer> computers) { Parallel.ForEach(…

c# yield-return parallel.foreach
How can I make `await …` work with `yield return` (i.e. inside an iterator method)?

I have existing code that looks similar to: IEnumerable<SomeClass> GetStuff() { using (SqlConnection conn = new SqlConnection(connectionString)) using (…

c# ado.net async-await generator yield-return
Is yield return in C# thread-safe?

I have the following piece of code: private Dictionary<object, object> items = new Dictionary<object, object>; …

c# ienumerable yield yield-return
Is it possible to use 'yield' to generate 'Iterator' instead of a list in Scala?

Is it possible to use yield as an iterator without evaluation of every value? It is a common task when …

scala yield continue yield-return yield-keyword
Yield return inside usings

If I recall correctly that when I used yield inside using SqlConnection blocks I got runtime exceptions. using (var connection = …

c# .net exception using yield-return
Trouble understanding yield in C#

I'm hoping to get some clarification on a snippet that I've recently stepped through in the debugger, but simply cannot …

c# .net yield yield-return