在VB6中,Property Set和Property Let有什么区别?
我刚刚创建了几个Property Set
方法,但是它们没有编译.当我将它们更改为Property Let
时,一切都很好.
I have just created several Property Set
methods, and they didn't compile. When I changed them to Property Let
, everything was fine.
此后,我研究了文档以查找Property Set
和Property Let
之间的区别,但必须承认没有一个更明智.有什么区别,如果可以的话,有人可以提供对此正确解释的指导吗?
I have since studied the documentation to find the difference between Property Set
and Property Let
, but must admit to being none the wiser. Is there any difference, and if so could someone offer a pointer to a proper explanation of it?
Property Set
用于对象(例如,类实例)
Property Set
is for objects (e.g., class instances)
Property Let
用于普通"数据类型(例如,字符串,布尔值,长整数等)
Property Let
is for "normal" datatypes (e.g., string, boolean, long, etc.)