Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


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

CHAPTER 11 OBJECT-ORIENTED PROGRAMMING W... > WORKING WITH COLLECTIONS

WORKING WITH COLLECTIONS

Collections are a data structure similar to arrays in that they allow you to refer to a grouping of items as one entity. Collections, however, provide an ordered means for grouping not only strings and numbers, but objects as well. As demonstrated next, the Collection object is used to create a collection data structure.

Dim myCollection As New Collection

Collections are popular data structures in object-oriented programming because they allow the grouping of objects using an ordered name/value pair. In fact, collections are objects themselves!

Items in a collection are referred to as members. All collection objects have one property and three methods for managing members, as described in Table 11.1.

TABLE 11.1 COLLECTION OBJECT PROPERTIES AND METHODS


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial