Free Trial

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

Share this Page URL
Help

11. The Class Library, Part 2 > Referencing Array Elements - Pg. 357

Referencing Array Elements Parentheses are used when initializing an array in the declaration statement and to reference elements within the array. You simply use an integer value to specify which element you want: The tricky bit--at least until you learn to count from zero--is that the first element of an array is element zero, not element one, and the last element is one less than the length of the array: Dim Weekend(2) As String Weekend(0) = "Saturday" Weekend(1) = "Sunday"