L
Lisa
Can anybody tell me what's the problem with this code?
Class CRate
public mRate as double
public mValue as double
end class
Class CBox
public bNo as long
public bRate as CRate()
End Class
======================
Private Sub Test()
Dim J as long
Dim BoxRead as CBox = New CBox(9) {}
For i = 0 to 9
BoxRead(i).bNo = i
BoxRead(i).bRate = New CRate(5) {}
For j = 0 to 5
BoxRead(i).bRate(j).mRate = (i * 12) + j
BoxRead(i).bRate(j).mValue = (i * j)
next j
next i
For i = 0 to 9
For j = 0 to 5
msgbox (BoxRead(i).bRate(j).mRate ) '<=== Error ?!
BoxRead(i).bRate(j).mValue
next j
next i
End Sub
Class CRate
public mRate as double
public mValue as double
end class
Class CBox
public bNo as long
public bRate as CRate()
End Class
======================
Private Sub Test()
Dim J as long
Dim BoxRead as CBox = New CBox(9) {}
For i = 0 to 9
BoxRead(i).bNo = i
BoxRead(i).bRate = New CRate(5) {}
For j = 0 to 5
BoxRead(i).bRate(j).mRate = (i * 12) + j
BoxRead(i).bRate(j).mValue = (i * j)
next j
next i
For i = 0 to 9
For j = 0 to 5
msgbox (BoxRead(i).bRate(j).mRate ) '<=== Error ?!
BoxRead(i).bRate(j).mValue
next j
next i
End Sub