Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Define an enum within a method
Message
 
À
28/11/2005 12:34:25
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
01072501
Message ID:
01072552
Vues:
15
>>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.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform