How do I implement this public accesible enum

Posted by Psytronic on Stack Overflow See other posts from Stack Overflow or by Psytronic
Published on 2010-03-18T21:03:34Z Indexed on 2010/03/18 21:11 UTC
Read the original article Hit count: 243

Filed under:
|
|

Hey guys,

I'm trying to access my class's private enum. But I don't understand the difference needed to get it working compared to other members;

If this works:

private double dblDbl = 2;

//misc code

public double getDblDbl{ get{ return dblDbl; } }

Why can I not do it with enum?

private enum myEnum{ Alpha, Beta};

//misc code

public Enum getMyEnum{ get{ return myEnum; } }
//throws "Window1.myEnum" is a "type" but is used like a variable

© Stack Overflow or respective owner

Related posts about c#

Related posts about enum