June 2006
Intermediate to advanced
1344 pages
42h 52m
English
The number of elements in an array can be changed at execution time. For example, when an array is used to store information about all the employees in a company, the size of the array would change when the company hires a new employee or when an employee leaves the company. The ReDim statement enables you to dynamically change the array size, but not the type of the array elements, nor the number of dimensions in the array. Figure 8.21 demonstrates the ReDim statement.
1 ' Fig. 8.21: ReDimTest.vb 2 ' Resize an array using the ReDim statement. 3 Module ReDimTest 4 Sub Main() 5 ' create and initialize ... |
Read now
Unlock full access