티스토리 뷰

http://www.advancedqtp.com/constructor-arguments-in-vbscript/

'An example for the new constructor format
Private Sub Class_Initialize '(Param1, Param2)
    'You can keep you Class_Initialize sub as private - it will still work!
    Msgbox Param1 'You can use you parameters just like any other variable
    Param2.Add "Some", "Thing" 'You can even pass objects, such as dictionaries
End Sub
'An example for the new object initialization format
Set oMyClass = New clsMyClass'("Something", oDic)
'You can pass strings, numbers, other vairbales and objects
댓글