如下:
Structure 班级类型
Dim 班级名称 As String
Dim 班级表名 As String
Dim 创建人 As String
Dim 科目数 As String
Dim 科目 As New Collection() '<—提示结构里的成员不能声明为 "new"
End Structure
...全文
843打赏收藏
能否在Structure 里嵌套集合??
能否在Structure 里嵌套集合?? 如下: Structure 班级类型 Dim 班级名称 As String Dim 班级表名 As String Dim 创建人 As String Dim 科目数 As String Dim 科目 As New Collection() '<—提示结构里的成员不能声明为 "new" End Structure
Structure ClassType
Dim ClassName As String
Dim ClassTableName As String
Dim Creator As String
Dim SubjectCount As String 'Why not use "Integer"??
Dim Subjects As Collection
End Structure
Private Record As ClassType
Sub Add()
Record.ClassName = "xxx"
Record.Creator = "xxx"
Record.Subjects = New Collection
Record.Subjects.Add("xxxxxx")
End Sub