vbs Public Property Get 的使用
如下代码, obj.getValue为什么取不到值Dim result,num
Dim obj
Set obj = New A
obj.setValue = Now
msgboxobj.getValue
Class A
PublicIn
Publicout
Public Property Let setValue (aaa) '输入属性值,
In = aaaa
End Property
Public Property Get getValue '输出属性
out = In
End Property
Public Function calcDate(num)
.............................
End Function
End Class 变量别用in
Public Property Get getValue '输出属性
getValue= In1
End Property
这样就应该能返回了 回复 2# skyzhu
必须是方法名么?
页:
[1]