Simply put:
In one method (ReadAccounts), I am reading an Access table into a List (AcctsList). I don't have a problem with that; that works.
In another method (DisplayAccounts), I would like to READ that list, and then process it.
I tried to make the list "global", but I am tripping up on the language. Here is my code:
Expand|Select|Wrap|Line Numbers
- public void ReadAccounts()
- {
- var AcctsList = new List<AcctRec>(); // How do I make THIS AcctsList available to other programs?
- }
- public void DisplayAccounts()
- {
- // Process AcctsList from ReadAccounts above.
- }
Thanks in advance! Any help is really appreciated.
Dave