views:

76

answers:

3

Here's my situation.

I have a library that has a set of enums that I need to use.

public enum showtype
{
  comedy = 1001, horror = 1002, mystery = 1003, action = 1004;
}

This library is being referenced by another library that I created. My library is referenced by more than one console based app.

I need to assign the show type directly from the console based app.

+1  A: 

It should be pretty simple. Add a reference to the library that contains the Enum inside your console application.

Justin Niessner
+1  A: 

Your enum is already exposed. Add the reference and you're ready to go.

Kamyar
+2  A: 

A few additional notes to clarify what may be going on:

  • If your application references a library that references the library with the enum, then this is not enough. You need to directly reference the library with the enum.

  • You should also make sure that you open the namespace where the enum is located using the using construct.

Tomas Petricek