枚举类型 基础知识巩固

 enum week
        {
            Mon,
            Tue,
            Thre,
            Wend,
            Fir,
            Jan,
            Sun,
        }
        static void Main(string[] args)
        {
            week myweek = week.Mon;
            int myweek1=(int)myweek ;
            Console.WriteLine(myweek);//输出Mon
            Console.WriteLine(myweek1);//输出0

        }

posted @ 2012-02-23 15:19  木子易  Views(107)  Comments(0Edit  收藏  举报