枚举也能直接转换为对应的数值输出

int week = (int)WEEK.TUESDAY;
            Console.WriteLine(week);//输出10
            Console.Read();

        public enum WEEK
        {

            MONDAY = 1,
            TUESDAY=10
        }

posted @ 2013-05-31 21:23  Predator  阅读(293)  评论(0编辑  收藏  举报