会员
周边
众包
新闻
博问
闪存
所有博客
当前博客
a56爆大奖在线娱乐的博客
a56爆大奖在线娱乐的园子
账号设置
简洁模式
...
退出登录
注册
登录
_YMW
博客园
首页
新随笔
联系
订阅
管理
判断是否枚举中的匹配项
1.首先定义一个枚举:enum Colors { None = 0, Red = 1, Green = 2, Blue = 4 };2.判断所给的值在枚举中是否存在string[] colorStrings = { "0", "2", "8", "blue", "Blue", "Yellow", "Red, Green" }; foreach (string colorString in colorStrings) { Colors colorValue;
posted @
2013-01-05 19:03
_YMW
阅读(
3789
) 评论(
0
)
编辑
收藏
举报
会员力量,点亮园子希望
刷新页面
返回顶部
公告