By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,344 Members | 1,142 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,344 IT Pros & Developers. It's quick & easy.

New user question : Classes

P: n/a
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
Nov 21 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
Vasilis,

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

Cor
Nov 21 '05 #2

P: n/a
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.

--
Rgds,
Anand
VB.NET MVP
http://www.dotnetindia.com
"Vasilis X" wrote:
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

Nov 21 '05 #3

P: n/a
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.
"Cor Ligthert" <no************@planet.nl> wrote in message
news:ef****************@tk2msftngp13.phx.gbl...
Vasilis,

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

Cor

Nov 21 '05 #4

P: n/a
Hi,

if you are looking for IPC (interprocess communication) then followed tips
can help you:
NamedPipes, SharedMemory, Remoting, TCP/IP

I wroted library on that topic (IPC for .NET):
http://www.habjansoftware.com/ipc_library.aspx

Regards,
Josip Habjan
URL: http://www.habjansoftware.com


"Vasilis X" <so*****@somewhere.com> wrote in message
news:Oe******************@TK2MSFTNGP14.phx.gbl...
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

Nov 21 '05 #5

P: n/a
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
Nov 21 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.