New user question : Classes

  • Thread starter Thread starter Vasilis X
  • Start date Start date
V

Vasilis X

Hello.
Here is the question :

I have a solution with multiple projects.
I want to share information within these projects. This information is
defined in the StartUp project.
How will I do it? Should I define a new class in the startup project or a
new class in the solution?
Then, how will i access the information stored in this new class from the
other projects?

I hope the question is well defined and looking forward some answers, hints,
links to read etc, etc... :-)

Vasilis
 
Vasilis,

What kind of project is it?
(WindowForms Forms, ASPNET, WebServices, Windowforms services, CE etc)

Cor
 
If you mean you want to share some kind of data between the differnt
projects, the easiest way would be to use a comman data store, either
databases or files. If you want to share via objects, then you would have to
have a singleton class, that gets created the first time and then the same
object is passed to the different projects, when those try to create the
class. That is the only way the data in the object will be retained and can
be shared.
 
It is a WindowForms project.

The data will be read from a .cfg file during startup and then should be
shared and updated
within the various projects.
 
Vasilis,

If it there is not heavy access needed, (just some basic information), than
I use the Registry.

If it is interacting, than you have more problems and should make your
message system depending on that. Others have already replied you about
that.

I hope this helps something,

Cor
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top