|
|
Private M()
Public count As Long
Property Let value(index, vData)
M(index) = vData
End Property
Property Get value(index)
value = M(index)
End Property
Function Add(fvalue)
count = count + 1
If count > 0 Then
ReDim Preserve M(1 To count)
M(count) = fvalue
End If
End Function
Function DelInd(index) '按索引删除元素
M(index) = ""
If count >= 0 Then count = count - 1
If count > 0 Then
M(index) = M(count + 1)
ReDim Preserve M(1 To count)
Else
Erase M
End If
End Function
这是我写的集合类
现在的问题是M这个数组我要记录TYPE类型的,怎么做?总不可能一个TYPE类型写一个类吧 |
|