Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Define an enum within a method
Message
 
To
28/11/2005 12:34:25
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
01072501
Message ID:
01072552
Views:
16
>>Can I define an enum within a method? (I don't think I can and I am not really sure I want to but I am still wondering)
>>
>>Something like this:
>>
>>private void myMethod()
>>{
>>  enum myEnum : byte
>>  {
>>    Zero = 0x00,
>>    One = 0x01
>>  }
>>
>>  // Method code that is using the enum
>>}
>>
>
>Einar,
>AFAIK no. However you could put it outside method as a member of class.
>Cetin


Thanks for confirming my thoughts. Thinking a little about it after I posted it doesn't really make a lot of sense to add an enum inside a method. Currently I have my enums as class members.
Semper ubi sub ubi.
Previous
Reply
Map
View

Click here to load this message in the networking platform