D.2. Functions Can Return Arrays

Functions and property procedures can now return arrays of any type. Previous versions of VB allowed you to return a variant data type containing an array, but now you can return a strongly typed array. For example:

Dim sArray() As String
Dim oCustomers As New Customers
sArray() = oCustomers.Names

Public Property Get Names() As String()
    Dim TempArray() As String
    '...code to get all the names of the customers
         Names = TempArray()
End Function

For information, see the entry for the Function statement in Chapter 7.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.191.223.123