开发者

Dictionary Object

Can you iterate through a dictionary object that can cont开发者_StackOverflow中文版ain a object and enum types

foreach(Dictionary<someObject, enumType> myDic in myObjects) {
    if(enumType.myType == enumType.Type) {
        do something here...
    }
}


foreach (KeyValuePair<object, enumType> foo in myObjects)
{
      if(foo.Value == enumType.Type)
      {
            // do your thang
      }

}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜