初学vb这段代码什么意思啊

来源:百度知道 编辑:UC知道 时间:2024/05/14 22:37:31
Public Property Let LastLoginTime(ByVal vData As Date)
'向属性指派值时使用,位于赋值语句的左边。
'Syntax: X.LastLoginTime = 5
mvarLastLoginTime = vData
End Property

Public Property Get LastLoginTime() As Date
'检索属性值时使用,位于赋值语句的右边。
'Syntax: Debug.Print X.LastLoginTime
LastLoginTime = mvarLastLoginTime
End Property
知道大概是附值 能具体说说吗

这是设置一个属性Property。
let表示的是 赋值
get表示的是 取值
当用xx.LastLoginTime=time 时调用的是Public Property Let LastLoginTime(ByVal vData As Date)
当用aa=xx.LastLoginTime 时调用的是Public Property Get LastLoginTime() As Date

建议先打好基础再看这方面的东西