参考书目:C#6.0学习笔记——从第一行C#代码到第一个项目设计(作者周家安)P102
学习目的:定义一个week枚举变量,获取其中各成员的名字
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Example3_18
{
public enum Week
{
// 表示星期日。
Sunday = 0,
//
// 摘要:
// 表示星期一。
Monday = 1,
//
// 摘要:
// 表示星期二。
Tuesday = 2,
//
// 摘要:
// 表示星期三。
Wednesday = 3,
//
// 摘要:
// 表示星期四。
Thursday = 4,
//
// 摘要:
// 表示星期五。
Friday = 5,
//
// 摘要:
// 表示星期六。
Saturday = 6
}
class Program
{
static void Main(string[] args)
{
//获取枚举成员名称
Console.WriteLine("常数周三的名字:{0}\n\n",
Enum.GetNam