I noticed that in C #, when I have Enum, say:
class ClassObject { public static Enum EventType = {Click, Jump, Etc}; }
And when I need to access it, I have to go through this main class, and that is a lot. For instance,
ClassObject.EventType.Click
I hope that I can access it shorter, say: EventType.Click , will let me get this.
So, what I thought, I could try to create a separate class and extend it from Enum:
class EventType : Enum { Click, Jump, Etc; }
However, for this I get a syntax error.
Actually, creating another separate class just for this purpose is a bit troublesome, and I don’t even know if this is good practice or not. But ideally, I just want to shorten the name and probably avoid having to enter the class name before accessing the enumeration. Is it possible?
source share