|
-
Jul 23rd, 2010, 07:46 AM
#9
Re: How to get assigned enums with OR?
 Originally Posted by stanav
The flag attribute is needed for the ToString method to work properly. Without it, you cannot call ToString of the enum if its value is a combination of 2 or more enum values.
Oh, so the ToString returns the set values, that's cool.
Anyway, I can remember reading somewhere that the attribute was not required in C#, but that it was in VB (in order for the bitwise flags to work at all), but I'm pretty sure I've used bitwise combinations before without the attribute... in VB. But I could be wrong.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|