Constants File

G

Guest

Hello,
I would like to gather all my constants in one file and use it for every
project.
Which kind of "New Item" file should I add to my project: Class item, Module
item, etc.?
 
R

rowe_newsgroups

Hello,
I would like to gather all my constants in one file and use it for every
project.
Which kind of "New Item" file should I add to my project: Class item, Module
item, etc.?

Doesn't matter much - I would pick either a static (shared) class or
use a module.

Thanks,

Seth Rowe
 
P

Phill W.

Mayer said:
I would like to gather all my constants in one file and use it for every
project.
Which kind of "New Item" file should I add to my project: Class item, Module
item, etc.?

As ever; It depends.

If you want to have some blocks of code that you "include" in each
project and it doesn't matter if you have to recompile stuff for the
changes to take effect, then a simple Class (or Module) will do.
(Remember to "Add > Link" this file into each new Project, or you'll
wind up with endless, dissociated copies of it spread all around your
projects).

If you want something more "real time", and changing a shared property
would affect every previously-compiled application at run-time, then you
need a Dll project (which will, of course, contain a number of Classes).
Add this to the Global Assembly Cache and every application on the
machine can reuse it.

HTH,
Phill W.
 

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

Top