public enum NoticeType
{
Notice = 'A',
LabRule = 'H',
HotInformation = 'N',
Column = 'C',
All = '1',
Null = '0'
}
//新建枚举类型
NoticeType noticeType1 = NoticeType.Column;
//把枚举类型转换为string d="Column"
string d = noticeType1.ToString();
//取得枚举类型的基数 dd='C'
char dd = (char)noticeType1;
//通过基数取得对应的枚举类型 noticeType2 = NoticeType.Notice
//(NoticeType)'A'; 两种方式都可以
NoticeType noticeType2 = (NoticeType)Char.Parse("A");
//通过名称取得枚举类型 noticeType3 = NoticeType.Notice
NoticeType noticeType3 = (NoticeType)Enum.Parse(typeof(NoticeType), "Notice");