D
Derek Martin
I have an object which I set up like this:
Public Class Person
....
Protected m_timelists as ArrayList
....
Property timelists() as ArrayList
Get
timelists = m_timelists
End Get
Set (ByVal Value as ArrayList)
m_timelists = Value
End Set
End Property
Is this legal and valid??? If yes, keep going:
Now I want to set it with some objects:
PersonList.addtimeobject(myUserid, time) 'Time object is previously created
and valid
Public Class PersonList
Dim personlist as new ArrayList 'To hold all the person objects
....
Public Function addtimeobject(ByVal userid as string, ByVal time as object)
Dim i as integer = 0
For i = 0 to personlist.count-1
if personlist(i).userid = userid then
personlist(i).timelists.add(time)
end if
Next
End Function
Error returned: Object variable or With block variable not set. This is
occurring on the timelists Arraylist Property Get and Set areas.
Can someone assist???? Thanks!
Public Class Person
....
Protected m_timelists as ArrayList
....
Property timelists() as ArrayList
Get
timelists = m_timelists
End Get
Set (ByVal Value as ArrayList)
m_timelists = Value
End Set
End Property
Is this legal and valid??? If yes, keep going:
Now I want to set it with some objects:
PersonList.addtimeobject(myUserid, time) 'Time object is previously created
and valid
Public Class PersonList
Dim personlist as new ArrayList 'To hold all the person objects
....
Public Function addtimeobject(ByVal userid as string, ByVal time as object)
Dim i as integer = 0
For i = 0 to personlist.count-1
if personlist(i).userid = userid then
personlist(i).timelists.add(time)
end if
Next
End Function
Error returned: Object variable or With block variable not set. This is
occurring on the timelists Arraylist Property Get and Set areas.
Can someone assist???? Thanks!