I need some advice

  • Thread starter Thread starter Samuel L Matzen
  • Start date Start date
S

Samuel L Matzen

I have an ENUM I need to use in multiple projects in a solution.

In the old days I would setup a header file containing the ENUM and
reference it in each project.

What is the best way to do this in the .NET multi-project solution?

Thanks for any input.

-Sam Matzen
 
You create a DLL that contains the ENUM. You can then reference the DLL in
multiple projects.

Lloyd Sheen
 
Lloyd,

Thanks for the reply.

So, just create a separate assembly for the common solution declarations and
reference it in each project.

In other words, make a header file using a separate assembly.

I thought there might be some "object oriented thing" I didn't know about
that was different than what we have been doing for 30 years.

-Sam Matzen
 
You can put the Enum in a module on it's own, then link to that file from
each project. Go to add existing file, and click the lil arrow on Open to
change it to Open as link (or summink :S!!). That'll add the same file to
each project, without the pain of copying the file to every folder.
I prefer this method over Lloyd's (perfectly acceptable) suggestion, because
the Enum is then enclosed in each exe/dll of your project, and not a
separate assembly.
__________________________________________
The Grim Reaper
 
Back
Top