Public ReadOnly Property Col() As Collection
Get
Return _col
End Get
End Property
Public Sub add(ByVal tmpTable As WXTable)
If IsNothing(_col) Then
_col = New Collection
End If
_col.Add(tmpTable)
End Sub
Public Function add(ByVal strKey As String) As WXTable
Dim obj As New WXTable
If IsNothing(_col) Then
_col = New Collection
End If
'obj.ID = FullSampleID
'obj.Desc = Desc
_col.Add(obj, strKey)
Return obj
End Function
Public Sub Remove(ByVal Name As String)
_col.Remove(Name)
End Sub
Public Function Count() As Integer
Return _col.Count
End Function
Public Sub Clear()
_col.Clear()
End Sub
Public Function Item(ByVal Name As String) As WXTable
Return _col(Name)
End Function
Public Function Item(ByVal key As Integer) As WXTable
Return _col(key)
End Function
End Class
Private _Tables As DataTableCollection
Public Property Tables() As DataTableCollection
Get
Return _Tables
End Get
Set(byval Value as DataTableCollection)
_Tables = Value
End Set
End Class
Public Class DataTable
'Code Here
End Class
Public Class DataTableCollection
'Code Here
End Class
对不对?
我认为是对的
但事实是当我把这个类实例化的时候
Sub Test()
Dim A As New DataSet
A.Tables. '到这里就有问题了,在句点后面列出的可用属性和方法中,并没有DataTableCollection类中的方法和属性