public shared classes
Posted on 2008-10-13
My program manages exam questions. Each question is assigned to a Bank. The Bank database table contains the Bank names, passwords, which Banks are currently opened, etc. In VB6 I had a class that tracked Bank data that was instantiated in the Startup form. Anytime a form (or other class) needed to read the Bank information, I created a Bank Class and used a Set to assign the class to the one that was instantiated in the Startup form. This way all parts of the program could read current bank information without having to read the database.
Is there a better way in Visual Net? Using Public Shared procedures in my Bank class does not allow me to use Structures that are defined in the Bank Class.
I guess I could move all the information to the Database, it just seems that there should be a way to reduce the amount of time spent reading the Bank Table.