当前位置: 首页 > >

如何把字符串转化为ENUM类型?

发布时间:

//我的枚举:
public enum Subject
None = 0,
Logon = 1,
Logoff = 2,
Ready = 3,
}

//如何把字符串"Logon"转化成枚举型?
Subject subject=(Subject)Enum.Parse(typeof(Subject),"Logon");





友情链接: