全域性工廠函式模擬引數化建構函式
' Making a factory with parameter to the class
Public Function new_Car(wheels)
Set new_Car = New Car
new_Car.Wheels = wheels
End Function
' Creating a car through a factory
Dim semiTrailer
Set semiTrailer = new_Car(18)
' Making a factory with parameter to the class
Public Function new_Car(wheels)
Set new_Car = New Car
new_Car.Wheels = wheels
End Function
' Creating a car through a factory
Dim semiTrailer
Set semiTrailer = new_Car(18)