using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace 枚举类型
{
enum week { 周一=1,周二,周三,周四,周五,周六,周日}
class Program
{
static void Main(string[] args)
{
Console.WriteLine("一周有七天,分别是:");
week WeekVar;
for (int i = 1; i < 8; i++)
{
WeekVar = (week)i;
Console.Write(WeekVar + "、");
}
Console.WriteLine("\n昨天是:" + (week)1);
Console.WriteLine("\n今天是:"+(week)2);
Console.WriteLine("\n明天是:" + (week)3);
Console.WriteLine("\n每周的:" + (week)2+"、"+(week)3+"、"+(week)4+"有C#课!");
Console.WriteLine("\n每周只有:" + (week)4 + "下午有课!");
Console.ReadKey();
}
}
}
|