'local variable(s) to hold property value(s)
Private mvarA As String 'local copy
Public Property Let A(ByVal vData As String)
'used when assigning a value to the property, on the left side of an assignment.
'Syntax: X.A = 5
mvarA = vData
End Property
Public Property Get A() As String
'used when retrieving value of a property, on the right side of an assignment.
'Syntax: Debug.Print X.A
A = mvarA
End Property
------------------------------------------------------------
'local variable(s) to hold property value(s)
Private mvarA As String 'local copy
Public Property Let A(ByVal vData As String)
'used when assigning a value to the property, on the left side of an assignment.
'Syntax: X.A = 5
mvarA = vData
End Property
Public Property Get A() As String
'used when retrieving value of a property, on the right side of an assignment.
'Syntax: Debug.Print X.A
A = mvarA
End Propertybyval不起作用,vb6里面如何实现VB.net的clone实例?
Private mvarA As String 'local copy
Public Property Let A(ByVal vData As String)
'used when assigning a value to the property, on the left side of an assignment.
'Syntax: X.A = 5
mvarA = vData
End Property
Public Property Get A() As String
'used when retrieving value of a property, on the right side of an assignment.
'Syntax: Debug.Print X.A
A = mvarA
End Property
------------------------------------------------------------
'local variable(s) to hold property value(s)
Private mvarA As String 'local copy
Public Property Let A(ByVal vData As String)
'used when assigning a value to the property, on the left side of an assignment.
'Syntax: X.A = 5
mvarA = vData
End Property
Public Property Get A() As String
'used when retrieving value of a property, on the right side of an assignment.
'Syntax: Debug.Print X.A
A = mvarA
End Propertybyval不起作用,vb6里面如何实现VB.net的clone实例?
解决方案 »
- VB 软件打包问题
- 欢迎vb高手以及用vb做项目的网友加入QQ群15763579
- 如何计算calendar控件的每月一号的范围
- 是不是在社区可以把别人加为好友啊?经常看到有人说加我
- 调查一下,大家都用什么工具做报表?
- True DBGrid 8.0 pro 在Win98下的问题
- 如何让MSHFLEXGRID只显示新增的记录
- 安装时跳过msbind.dll,然后提示"类未注册,clsid 为{59245250-7A2F-11D0-9482-00A0C91110ED}"火急!
- 如何保护 Windows系统中的“显示”属性?
- 难倒我了(数据库高手,请帮忙,adodc,odbc)
- 关于控件随窗口大小化的问题
- VB6数据库查询问题 标准表达式中数据类型不匹配
Dim testA, testB, testC
Set testA = New Class1
''MsgBox testA.Property(0)
''MsgBox CStr(testA.Class)
testA.A = "A"
Set testB = testA
testB.A = "B"
MsgBox testA.A
Set testC = clone(testA)
testC.A = "C"
MsgBox testA.A
'' testA.a=
End SubPrivate Function clone(ByVal instance) As Class1
Set clone = New Class1
Set clone = instance
End Function