Section 8.16. Wrap-Up


8.16. Wrap-Up

This chapter began our discussion of data structures, exploring the use of arrays to store data in and retrieve data from lists and tables of values. The chapter examples demonstrated how to declare an array, initialize an array and refer to individual elements of an array. We showed how to pass arrays to methods using ByVal and ByRef. We also showed how to use the For Each...Next statement to iterate through the values in an array without using an index. We explained how to declare and manipulate rectangular arrays and jagged arrays. We wrote methods that use variable-length parameter lists. Finally, we demonstrated how to use the ReDim statement to dynamically change an array's size.

Chapter 24, Data Structures introduces dynamic data structures, such as lists, queues, stacks and trees, that can grow and shrink as programs execute. Chapter 25, Generics, presents one of Visual Basic 2005's new featuresgenericswhich provides the means to create general models of methods and classes that can be declared once but used with many different types. Chapter 26, Collections, introduces Visual Basic's predefined data structures, which you can use instead of building your own.

We have now introduced the basic concepts of classes, objects, control statements, methods and arrays. In Chapter 9, we take a deeper look at classes and objects.



Visual BasicR 2005 for Programmers. DeitelR Developer Series
Visual Basic 2005 for Programmers (2nd Edition)
ISBN: 013225140X
EAN: 2147483647
Year: 2004
Pages: 435

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net