[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

public shared classes

Posted on 2008-10-13
1
Medium Priority
?
177 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 60

Accepted Solution

by:
Kevin Cross earned 1400 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …

649 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