>From: Ishita Ghosh <ighosh@cal.interrasystems.com> > According to LRM 1800-2005 Sec 7.9 >"Access to nonstatic members or to the special this handle within the >body of a static method is illegal" > >So, if the use of enum element in a static method, as in the given >testcase, is allowed >then it implies that the enum variable though explicitly not declared as >'static' >is being implicitly considered as 'static'. Correct me if I am wrong. My answer to this is the same as the others. However, I would describe it in a different way. This LRM rule does not apply to the enum constants, because the enum constants are not members of the class. A member of the class is either a property or a method of the class. These enum constants are names declared inside the scope of the class, but they are neither properties nor methods. The LRM rule only applies to nonstatic *members*, so it does not apply to these enum constants. Steven Sharp sharp@cadence.com -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.Received on Fri Jan 9 14:39:03 2009
This archive was generated by hypermail 2.1.8 : Fri Jan 09 2009 - 14:39:45 PST