H
Hei
Hi All,
i have a problem about a class that have a shared member. in my app have
frmA and frmB, frmB is call by frmA use ShowDialog, frmB have a member
"_Prescriptions as ArrayList" that is use to contain a list of prescription
and i use a function "CreatePrescription" (see below) to add "prescription"
to this. after i close the frmB and show it again, the Shared member
_GiveQty is remenber the value.
what time the shared member value will reset?
i want reset the value when close frmB, do i need do something to handle?
Private Function CreatePrescription
dim a as prescription
_Prescription.add(a)
End Function
Public Class Prescription
Private Shared _GiveQty As Integer
Public Property GiveQty() As Integer
Get
Return _GiveQty
End Get
Set(ByVal Value As Integer)
_GiveQty += 1
End Set
End Property
End Class
thx
Hei
i have a problem about a class that have a shared member. in my app have
frmA and frmB, frmB is call by frmA use ShowDialog, frmB have a member
"_Prescriptions as ArrayList" that is use to contain a list of prescription
and i use a function "CreatePrescription" (see below) to add "prescription"
to this. after i close the frmB and show it again, the Shared member
_GiveQty is remenber the value.
what time the shared member value will reset?
i want reset the value when close frmB, do i need do something to handle?
Private Function CreatePrescription
dim a as prescription
_Prescription.add(a)
End Function
Public Class Prescription
Private Shared _GiveQty As Integer
Public Property GiveQty() As Integer
Get
Return _GiveQty
End Get
Set(ByVal Value As Integer)
_GiveQty += 1
End Set
End Property
End Class
thx
Hei