using System;
using System.Text;
namespace Test
{
enum Color1 { red,yellow,blue,black,white}
class Program
{
static void Main()
{
Console.WriteLine((int)Color1.red);
}
}
}
C#之枚举
本文转载:CSDN博客
using System;
using System.Text;
namespace Test
{
enum Color1 { red,yellow,blue,black,white}
class Program
{
static void Main()
{
Console.WriteLine((int)Color1.red);
}
}
}