• RBarryYoung (12/24/2009)


    Gift Peddie (12/23/2009)


    RBarryYoung (12/23/2009)


    C# "[font="Courier New"]yield break[/font]"? Yikes!

    I don't suppose there's a way to implement your example in VB.net, is there? (I don't know of any way to directly emulate [font="Courier New"]yield break[/font] in VB.)

    No yield is one those C# only definition because per Microsoft there is no valid reason to define it in VB.

    I already indicated that I knew that, Gift. Despite that fact that there is no deterministic general conversion for C# [font="Courier New"]yield break[/font], it is quite often possible to work out a case-specific method that can enable the same functionality in VB.net. Again, entirely dependent on the specific case, in this case, Solomon's clever method for streaming CLR-TVF data returns. It would be extremely valuable to me to be able to duplicate this performance in VB.net.

    I did not say you don't know that, I actually wanted to point out the yield being an iterator dependence on C# before your post.

    Kind regards,
    Gift Peddie