全局工厂函数模拟参数化构造函数
' 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)