C#枚举的使用_IT

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Demo
{
    enum orientation:byte
    {
        north = 1,
        south = 2,
        east = 3,
        west = 4
    }
    class Program
    {
        static void Main(string[] args)
        {
            byte directionByte;
            string directionString;

            orientation myDirection = orientation.north;
            Console.WriteLine("myDirection = {0}",myDirection);

            directionByte = Convert.ToByte(myDirection);
            directionString = Convert.ToString(myDirection);

            Console.WriteLine("directionByte = {0}", directionByte);
            Console.WriteLine("directionString = {0}", directionString);
            Console.ReadKey();
        }
    }
}