// The [Flags] attribute should be used whenever the enumerable represents a collection of possible values


/*
    Each account on a website has a set of access flags that represent a users access.

    Update and extend the enum so that it contains three new access flags:

    A Writer access flag that is made up of the Submit and Modify flags.
    An Editor access flag that is made up of the Delete, Publish and Comment flags.
    An Owner access that is made up of the Writer and Editor flags.
    For example, the code below should print "False" as the Writer flag does not contain the Delete flag.

    Console.WriteLine(Access.Writer.HasFlag(Access.Delete)) 
*/

using System;

namespace MyCompiler {
    class Program {
           [Flags]
        public enum Access
        {
            None = 0, // for explanation check → https://[Log in to view URL]
            Delete = 1,
            Publish = 2,
            Submit = 4,
            Comment = 8,
            Modify = 16,
            Writer = Submit | Modify,
            Editor = Delete | Publish | Comment,
            Owner = Writer | Editor
        }

        
        public static void Main(string[] args) {
            Console.WriteLine("Hello world!");
            Console.WriteLine(Access.Writer.HasFlag(Access.Submit));
        }
    }
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: