Suggestions for improvement on the code segment

enum MyEnum
    {
        One,
        Two,
        Three
    }

    class Program
    {
        static void Main(string[] args)
        {
            MyEnum m = MyEnum.One;
            //MS own snippets, switch (m) can automatically fill in the values ​​enumerated type.
            switch (m)
            {
                case MyEnum.One:
                    break;
                case MyEnum.Two:
                    break;
                case MyEnum.Three:
                    break;
                default:
                    break;
            }

            //Resharper 7.1.3 code snippet, switch (m) can not be enumerated type lists the various values. Need to manually add a one
            switch (m)
            {
                //need manually add a one    
            }
            Console.WriteLine();
        }
    }


You can improve it?
1 comment
Comment actions Permalink
Just hit Alt+Enter when the cursor is inside the switch block - you'll see an option to generate case statements.
0

Please sign in to leave a comment.