|
-
May 14th, 2008, 06:58 AM
#7
Re: basic questions about enum
Thanks MadHatte,
My current confusion is, it seems whether or not using flags attribute has the same result. Here is my code. So, my question now is that I want to see whether there are any special usage for flags attribute which we can not have without this attribute.
Any comments?
Code:
using System;
class Test
{
enum Days
{
Mon = 1,
Tue = 2
};
[Flags]
enum DaysFlag
{
Mon = 1,
Tue = 2
};
static void Main()
{
int a = (int) (Days.Mon | Days.Tue);
int b = (int)(DaysFlag.Mon | DaysFlag.Tue);
return;
}
}
regards,
George
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
|