• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 13. Control Statements > The For Each Loop

13.4. The For Each Loop

The For Each loop is a variation on the For loop that was designed to iterate through a collection of objects (as well as through elements in an array), and is generally much more efficient than using the traditional For loop. The general syntax is:

For Each ObjectVar In CollectionName

   ' block of code goes here . . .

Next ObjectVar
            


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint