ConsoleColor原来有16种, enumData.GetValue(i)

Console.WriteLine("Name:{0},Value:{0:D}", enumData.GetValue(i));

Name:Black,Value:0
Name:DarkBlue,Value:1
Name:DarkGreen,Value:2
Name:DarkCyan,Value:3
Name:DarkRed,Value:4
Name:DarkMagenta,Value:5
Name:DarkYellow,Value:6
Name:Gray,Value:7
Name:DarkGray,Value:8
Name:Blue,Value:9
Name:Green,Value:10
Name:Cyan,Value:11
Name:Red,Value:12
Name:Magenta,Value:13
Name:Yellow,Value:14
Name:White,Value:15

posted @ 2016-06-13 23:18  FredGrit  阅读(179)  评论(0编辑  收藏  举报