Enums across multiple projects

  • Thread starter Thread starter Rathtap
  • Start date Start date
R

Rathtap

Suppose I have the following enum that I need in multiple projects:

enum Ratings{Poor=1,Satisfactory,Medium,Good,Excellent};

Instead of defining it in every project that needs it, I want to
create it in one and have it accessible from the others. How do I do
it?
 
You have to compile the project which contains the definition of your enum
as dll.
Then you can add in the other projects a reference to this dll, and now you
can use this enum is this projects.
 
Rathtap,

All you have to do is define it in an assembly, and reference that
assembly among all those projects that you want to use it in.

Hope this helps.
 
Back
Top