Quantcast
Channel: Visual C# forum
Viewing all articles
Browse latest Browse all 31927

Flags Enumerations & Adding New Code Item

$
0
0

Hi all,

i was wondering whats the best way to create a new code file for a flag enumeration?

the reason being that when i used the add new code file option it didnt load the "using system" directive 

i think this was the problem i was having coz there were build errors for the following code:

[Flags]
public enum Days
{
    None = 0,
    Sunday = 0x001,
    Monday = 0x002,
    Tuesday = 0x004,
    Wednesday = 0x008,
    Thursday = 0x016,
    Friday = 0x032,
    Saturday = 0x064,
}

but when i put System.Flag it worked fine


Viewing all articles
Browse latest Browse all 31927

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>