Solved

public shared classes

Posted on 2008-10-13
1
173 Views
Last Modified: 2012-05-05
dGreetings,

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.

Thanks




0
Comment
Question by:vaughnwhitehead
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 59

Accepted Solution

by:
Kevin Cross earned 350 total points
ID: 22708454
You should be able to access Shared members of your class from Shared method.  You should be able to use a data layer that is shared no problem as long as you properly account for multiple threads writing to data; however, sounds like you have multiple read situation.

Regards,
Kevin
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Since .Net 2.0, Visual Basic has made it easy to create a splash screen and set it via the "Splash Screen" drop down in the Project Properties.  A splash screen set in this manner is automatically created, displayed and closed by the framework itsel…
Microsoft Reports are based on a report definition, which is an XML file that describes data and layout for the report, with a different extension. You can create a client-side report definition language (*.rdlc) file with Visual Studio, and build g…
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question