I keep an ArrayList in the external class. The external class is passed into
a form via New constructor (see below). I process some data with functions
within the form before showing the form. I populate the array contained in
the passed class, then I show the form modally (frm.ShowDialog) so the user
can interact, and when the user closes the form, the array is emtpy.
Why??????
I check the Count property before, and after the showing the form and when I
close the form this empties array? Any idea? Help!!
Debug.WriteLine(en.alAnM.Count) ---> gives e.g. 16
Dim eResult As DialogResult = Me.ShowDialog
If eResult = DialogResult.Cancel Then
Exit Function
End If
Debug.WriteLine(en.alAnM.Count) ------> gives 0 !?
The array list alAnM is stored in the class within another project within
common solution (sln). Why the ShowDialog procedure empties array?
Public Sub New(ByRef _en As MyClass)
MyBase.New()
'This call is required by the Windows Form Designer.
InitializeComponent()
en = _en
End Sub
Private en as MyClass
--
Strah @ Langan