B
Billy Jacobs
I am getting an error saying:
Public Method BaseGet not found on
Type 'clsRunCollection'.
The error occurs on the call to Public Property Run. If I
change the parameter to an integer it works but I need to
retrieve the object based on it's key.
The following is my class:
Imports System.Collections.Specialized
Public Class clsRunCollection : Inherits
NameObjectCollectionBase
'Public Sub New()
' MyBase.New()
'End Sub
Public Sub Add(ByVal strKey As String, ByVal objRun
As clsRun)
MyBase.BaseAdd(strKey, objRun)
End Sub
Public ReadOnly Property RunExists(ByVal strKey As
String) As Boolean
Get
If MyBase.BaseGet(strKey) Is Nothing Then
Return False
Else
Return True
End If
End Get
End Property
Public Sub Remove(ByVal idx As Object)
If TypeName(idx) = "String" Then
MyBase.BaseRemove(idx)
Else
MyBase.BaseRemoveAt(idx)
End If
End Sub
Public ReadOnly Property Run(ByVal idx As Object) As
clsRun
Get
If TypeName(idx) = "String" Then
Return MyBase.BaseGet(CStr(idx))
Else
Return MyBase.BaseGet(idx)
End If
End Get
'Set(ByVal Value As clsRun)
' MyBase.BaseSet(vbNull, Value)
'End Set
End Property
'Count is inherited so no need to implement
End Class
Thanks,
Billy Jacobs
Public Method BaseGet not found on
Type 'clsRunCollection'.
The error occurs on the call to Public Property Run. If I
change the parameter to an integer it works but I need to
retrieve the object based on it's key.
The following is my class:
Imports System.Collections.Specialized
Public Class clsRunCollection : Inherits
NameObjectCollectionBase
'Public Sub New()
' MyBase.New()
'End Sub
Public Sub Add(ByVal strKey As String, ByVal objRun
As clsRun)
MyBase.BaseAdd(strKey, objRun)
End Sub
Public ReadOnly Property RunExists(ByVal strKey As
String) As Boolean
Get
If MyBase.BaseGet(strKey) Is Nothing Then
Return False
Else
Return True
End If
End Get
End Property
Public Sub Remove(ByVal idx As Object)
If TypeName(idx) = "String" Then
MyBase.BaseRemove(idx)
Else
MyBase.BaseRemoveAt(idx)
End If
End Sub
Public ReadOnly Property Run(ByVal idx As Object) As
clsRun
Get
If TypeName(idx) = "String" Then
Return MyBase.BaseGet(CStr(idx))
Else
Return MyBase.BaseGet(idx)
End If
End Get
'Set(ByVal Value As clsRun)
' MyBase.BaseSet(vbNull, Value)
'End Set
End Property
'Count is inherited so no need to implement
End Class
Thanks,
Billy Jacobs