Can you access enums in one class from another? I have a models folder with some enum values setup in a class file. I want to access those enums from within another class. When I instantiate the class object (myClass type Stats value new Stats()), i was hoping to have access to the enum values, but intellisense does not seem to recognize them.
Thanks.
Hi, a couple of questions. Are you compiling to .NET or to JVM? What exactly do you mean when you say you have enum values in a class file? Do you have an enum definition nested within a class file, something like:
class-id a.
...
enum-id MyEnum
...
end enum.
end class.
...?
if so, when accessing the enum from outside of a, you will need to reference it as a nested type i.e. type a MyEnum in this case.
Can you access enums in one class from another? I have a models folder with some enum values setup in a class file. I want to access those enums from within another class. When I instantiate the class object (myClass type Stats value new Stats()), i was hoping to have access to the enum values, but intellisense does not seem to recognize them.
Thanks.
that is exactly what i needed for it to work, the sign. Thanks.
Can you access enums in one class from another? I have a models folder with some enum values setup in a class file. I want to access those enums from within another class. When I instantiate the class object (myClass type Stats value new Stats()), i was hoping to have access to the enum values, but intellisense does not seem to recognize them.
Thanks.
that is exactly what i needed for it to work, the sign. Thanks.
Can you access enums in one class from another? I have a models folder with some enum values setup in a class file. I want to access those enums from within another class. When I instantiate the class object (myClass type Stats value new Stats()), i was hoping to have access to the enum values, but intellisense does not seem to recognize them.
Thanks.
that is exactly what i needed for it to work, the sign. Thanks.
Can you access enums in one class from another? I have a models folder with some enum values setup in a class file. I want to access those enums from within another class. When I instantiate the class object (myClass type Stats value new Stats()), i was hoping to have access to the enum values, but intellisense does not seem to recognize them.
Thanks.
Hi, a couple of questions. Are you compiling to .NET or to JVM? What exactly do you mean when you say you have enum values in a class file? Do you have an enum definition nested within a class file, something like:
class-id a.
...
enum-id MyEnum
...
end enum.
end class.
...?
if so, when accessing the enum from outside of a, you will need to reference it as a nested type i.e. type a MyEnum in this case.