VB?

Sep 8, 2010 at 9:28 AM

Hi,

can I use this framework from VB??

Is there a sample around?

(because 'we' don't have the 'yield' functionality, do we ?)

 

With best regards

Gerhard

Sep 8, 2010 at 10:56 AM

I'm afraid there isn't any comfortable solution for iterators in VB (at least, none as elegant as yield is, as far I know).

See: http://stackoverflow.com/questions/2526836/is-there-a-way-to-implement-caliburn-like-co-routines-in-vb-net-since-theres-no/2529926

As a (really) partial workaround, you might consider returning an array of IResult, but this won't allow you to insert logic to decide WHICH IResult to put in the sequence based on previous IResult execution; this is obviously only feasible for plain linear sequences...
Unfortunately this way you lose one of the main advantages of coroutines, but you can still benefit of a sequential execution of multiple asynchronous operation.