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.
 

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

Similar Threads

about enum 3
Enum TypeConverter 3
enum questions 2
Merge Info From Two Enums 1
Enum Extentions 7
Enum extenting 3
Enums & Constructors? 4
I have small probalem 4

Back
Top