I want to declare an arrayList on the main form of my VB.Net 2005 MDI application that is able to be updated by child forms. So, I was planning on using this as a global declaration, prior to the Form1_Load sub:
Friend myArrayList() As ArrayList
Then inside Form1, I have tried to instanciate in the following ways:
myArrayList() = New ArrayList 'throws error --> Number of indices is less than the number of dimensions of the indexed array.
myArrayList = New ArrayList 'throws error --> Value of type System.Collections.ArrayList cannot be converted to 1-dimensional
array of System.Collections.ArrayList
What I am trying to do is keep a list of opened related files which I call a filegroup. Certain application menu items are enabled when all files in a filegroup are open in the application. When one of the files in a filegroup is closed, I need to be able to disable the appropriate menu items, since filegroup functions should no longer be enabled.
Obviously I am missing something simple with this arrayList thing. Help?