Skip to main content

  | मौसम…

411 समाचार
Public archive edition · Attributed source reporting with original dates · AI drafts are excluded

411 REFERENCE · Wikibooks

.NET Development Foundation/Iterators

Reference material by Wikibooks contributors. This retains its source identity and is not 411 news reporting.

Value Types An iterator is a section of code that enables one to traverse a data structure and return each element of the same type in turn. The iterator code uses the yield return statement to return each element in turn. When the yield return statement is reached, the current location is stored. Execution is restarted from this location the next time the iterator is called.