how does C# "yield" translate into VB.NET?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

How does the following C# code look like in VB.NET?

IEnumerator<T> IEnumerable<T>.GetEnumerator()
{
foreach (Node<T> node in this.headNode)
{
yield return node.Data;
}
}


thanks herbert
 
How does the following C# code look like in VB.NET?

There's no direct translation since VB.NET doesn's have that feature
(iterators). You have to manually implement IEnumerable and maintain
the state machine.


Mattias
 
Mattias,

is there any URL you recommend that helps me to start this?
herbert
 

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