初学C#,问个关于枚举的简单问题
代码:
using System;
using System.Collections.Generic;
using System.Text;
class Program
{
struct strtest
{
public string name;
public int age;
}
public enum enumWeek
{
Sunday = 0,
Monday = 1,
mycount = 200
}
static void Main(string[] args)
{
strtest st = new strtest();
st.name = "xiaojie ";
st.age = 20;
strtest st1;
st1 = st;
int i = 200;
switch (i)
{
case (int) enumWeek.Sunday:
Console.WriteLine( "输出0 ");
break;
case (int) enumWeek.Monday:
Console.WriteLine( "输出1 ");
break;
case (int)enumWeek.mycount:
Console.WriteLine( "输出200 ");
break;
default:
Console.WriteLine( "没有输出 ");
break;
}
int myco = 200;
int total;