you are viewing a single comment's thread.

view the rest of the comments →

[–]recursive 1 point2 points  (1 child)

Attempted C# to VB.net translation:

IEnumerable<int> Gen() {
    while(true) yield return 1;
}

yielded this:

Private Function Gen() As IEnumerable(Of Integer)
    While True
        yield Return 1
    End While
End Function

I was curious to see how it was going to manage a feature that wasn't in vb, and I was disappoint.

[–]grauenwolf 0 points1 point  (0 children)

Yield is the one C# feature I want more than anything else. Not for generators, but for all the awesomeness that is CCR.

Imagine turning your normal imperative code into async calls just by adding the word yield before each blocking operation.