[Mono-list] FlagsAttribute

Jim Richardson develop@wtfo.wtfo-guru.com
Sat, 25 Aug 2001 12:15:03 -0500


When implementing an enumeration in the class library be sure to implement
any specified attributes. The FlagsAttribute is the only one I have
blundered across so far, but I suspect there are others. The doc for the the
enumeration should indicate what if any attributes the enumeration (or other
object(s) for that matter) has.
Here is how the FlagsAttribute is implemented according to a .NET sample I
found, and I did verify the compiler accepts it.

namespace System.Security.Permissions
{

[Flags]
public enum FileIOPermissionAccess
{
    AllAccess,
    Append,
    NoAccess,
    PathDiscovery,
    Read,
    Write,
}

}