public enum A {
A1_ASC,
A1_DSC,
A2_ASC,
A2_DSC;
}
If I access A1_ASC, I have to do A.A1_ASC.
Is it possible to have a so called enum within an enum so that i can do a:
A.ASC.A1
A.ASC.A1
A.DSC.A2
A.DSC.A2
Sympatico Member - 12 Jun 2005 09:58 GMT
http://www.brayneychyled.com/helpoutsometimes.htm
> public enum A {
> A1_ASC,
[quoted text clipped - 11 lines]
> A.DSC.A2
> A.DSC.A2
- - 12 Jun 2005 11:18 GMT
> http://www.brayneychyled.com/helpoutsometimes.htm
Ctrl+K
Wibble - 12 Jun 2005 16:19 GMT
> public enum A {
> A1_ASC,
[quoted text clipped - 11 lines]
> A.DSC.A2
> A.DSC.A2
how about
public class A {
public static enum A1 {...}
public static enum A2 {...}
}
Wibble - 12 Jun 2005 16:20 GMT
>> public enum A {
>> A1_ASC,
[quoted text clipped - 18 lines]
> public static enum A2 {...}
> }
Oops
public class A {
static enum ASC ...
}
- - 13 Jun 2005 01:33 GMT
>> how about
>> public class A {
[quoted text clipped - 6 lines]
> static enum ASC ...
> }
I tried that but instead of having the method accepting (A a) as the
parameter, I must change it to 'method(A.ASC a)' and add another method
'method(A.DSC a)' rather than having one method 'method(A a)'.
- - 13 Jun 2005 01:51 GMT
>>> how about
>>> public class A {
[quoted text clipped - 10 lines]
> parameter, I must change it to 'method(A.ASC a)' and add another method
> 'method(A.DSC a)' rather than having one method 'method(A a)'.
nvm.. i get what you mean.