绕死了,是不是将字符串转枚举呢//一个enum的例子
enum Colors { Red = 1, Green = 2, Blue = 4, Yellow = 8 };
//转换的例子
Colors myColor = (Colors)Enum.Parse(typeof(Colors), "Yellow");
enum Colors { Red = 1, Green = 2, Blue = 4, Yellow = 8 };
//转换的例子
Colors myColor = (Colors)Enum.Parse(typeof(Colors), "Yellow");
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货