The equivalent of C#'s yield contextual keyword

  • Thread starter Thread starter cartoper
  • Start date Start date
C

cartoper

I am coming to VB.Net from C#. One feature I really like about C# is
the yield contextual keyword. Here is what MSDN says about it:

--------------
Used in an iterator block to provide a value to the enumerator object
or to signal the end of iteration. It takes one of the following forms:

yield return expression;
yield break;
 
Does VB have this concept? If so, what might it be?

No, VB doesn't support iterators. You have to manually implement
IEnumerable/IEnumerator and maintain the state machine.


Mattias
 
I assume that this conflicts with the in VB.Net by most liked multiple
indexes, which are not in C#

Cor
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top