在VB6中,Property Set和Property Let有什么区别? [英] In VB6 what is the difference between Property Set and Property Let?

查看:249
本文介绍了在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 SetProperty 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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆