Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using enum as a parameter
Message
 
To
22/12/2004 11:21:21
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00971423
Message ID:
00971470
Views:
26
Cetin,
Hmm I guess I find that a flaw with the enum. I guess that means I have to add code to my method that accepts an enum as a parameter to ensure that the parameter passed is a member of that enum and I hope I can find a way to do this genericly so I don't have to hardcode this.
Thanks for the information even if it wasn't what I wanted to hear :)
Einar
>Einar,
>By definition (From "C# Language specification"):
>"The set of values that an enum type can take on is not limited by its enum members. In particular, any value of the underlying type of an enum can be cast to the enum type, and is a distinct valid value of that enum type."
>
>You've to check what you get.
>Cetin
Semper ubi sub ubi.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform