枚举变量类型
2012-04-24 21:45 精诚所至 金石为开 阅读(178) 评论(0) 编辑 收藏 举报关于枚举类型变量。
using System; namespace Ch05Ex02 { enum orientation:byte { north=1, south=2, east=3, west=4, } class Program { static void Main(string[] args) { orientation myDirection=orientation.north; Console.WriteLine("myDirection={0}",myDirection); Console.ReadKey(); } } }
![](https://img2024.cnblogs.com/blog/35695/202408/35695-20240803130933255-1404888097.jpg)