C# cross class enum visibility - Possible?

Posted by 537mfb on Stack Overflow See other posts from Stack Overflow or by 537mfb
Published on 2012-04-13T10:48:22Z Indexed on 2012/04/13 11:29 UTC
Read the original article Hit count: 181

Filed under:
|
|

so i have a class ClassA that contains an enum MyEnum, and a class ClassB that references that class (different Projects) and so in ClassB i have a

using ClassA;

clause and i can access that enum using something like

MyEnum value = MyEnum.EnumValue;

Now on a third project i have my Windows form and it has a clause like

using ClassB;

Now what can i add in ClassB to acess that enum on my windows Form? Is it even Possible? i would like to avoid having to add ClassA to my form just to access an enum.

The idea is that ClassB is sort of a manager between my form and the functionality in ClassA - but i would like to get access to that enum as it makes a lot of tasks easier

© Stack Overflow or respective owner

Related posts about c#

Related posts about class