在 VB6 中,Property Set 和 Property Let 有什么区别? [英] In VB6 what is the difference between Property Set and 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.)
这篇关于在 VB6 中,Property Set 和 Property Let 有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!