Click here to Skip to main content
15,894,017 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hai,


I have some doubts regarding flag attribute.In windows application project they used flag attribute.But If I create a new application i tried to use flag attribute.But it is not accepting the flag attribute.Is there any namespace for using flag attribute?Plz help me.


Thanks in Advance
Sridharan.C
Posted

1 solution

Namespace: System
The [Flags] attribute on an enum allows you to assign multiple values to your enum at once.

Look here for details:
C# Enum Flags Attribute[^]

Example on how it can be used:
Enum Flags Attribute[^]
Why do we need a [Flags] attribute on enums?[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900