D
developer1996
Can someone please explain to me why you cannot use enum
at the method level to define a type. The declaration
seems to only work at the class level. From my
understanding enums are classified as a user define type.
I do understand that in order to define a type you have to
derive it from object or a struct. But the question still
remains why only at class level. I guess the only way to
really define a type within a class is to define an inner
class and then define an enum type within the inner class.
But the scope of the enum type would be private to the
parent class. Simple concept but I just want to know why?
at the method level to define a type. The declaration
seems to only work at the class level. From my
understanding enums are classified as a user define type.
I do understand that in order to define a type you have to
derive it from object or a struct. But the question still
remains why only at class level. I guess the only way to
really define a type within a class is to define an inner
class and then define an enum type within the inner class.
But the scope of the enum type would be private to the
parent class. Simple concept but I just want to know why?