转载自:http://www.cnblogs.com/tishifu/archive/2008/01/03/1024513.html
定义以下枚举
public enum BookType
{
Ticket,
Trip,
Hotel
}
从String到enum
BookType type = (BookType)Enum.Parse(typeof(BookType),"Ticket");
从enum到String
方法一:ToString();
方法二:s = Enum.GetName(typeof(BookType), BookType.Ticket);