June 2006
Intermediate to advanced
1344 pages
42h 52m
English
To pass an array argument to a method, specify the name of the array without using parentheses. For example, if array hourlyTemperatures has been declared as
Dim hourlyTemperatures As Integer() = New Integer(24) {}
the method call
DayData(hourlyTemperatures)
passes array hourlyTemperatures to method DayData.
Every array object “knows” its own upper bound (i.e., the value returned by the method GetUpperBound), so when you pass an array object to a method, you do not need to pass the upper bound of the array as a separate argument.
For a method to receive an array through a method call, the method’s parameter list must specify that an array will be received. For example, the method header for DayData might ...
Read now
Unlock full access