枚举类型 基础知识巩固
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
}
凡事用心去做,认真对待!