Public Property Get Powers(ID As Integer) As POWERSINFO
With mPowers(ID)
Powers.ID = .ID
Powers.Name = .Name
Powers.Description = .Description
End With
End Property使用不当.应该把:
Public Type POWERSINFO
ID As Integer
Name As String
Description As String
End Type在 clsPowers.cls 里面声明.
With mPowers(ID)
Powers.ID = .ID
Powers.Name = .Name
Powers.Description = .Description
End With
End Property使用不当.应该把:
Public Type POWERSINFO
ID As Integer
Name As String
Description As String
End Type在 clsPowers.cls 里面声明.
With mPowers(ID)
Powers(id).ID = .ID
Powers(id).Name = .Name
Powers(id).Description = .Description
End With
End Property
Public Property Get Powers(ID As Integer) As POWERSINFO出错提示:“只有在公共对象模块中定义的公共用户定义类型可以作为参数、类模块的公共过程返回类型、公共用户定义类型的字段使用。”