开发者

Dictionary Object

开发者 https://www.devze.com 2023-01-07 19:49 出处:网络
Can you iterate through a dictionary object that can cont开发者_StackOverflow中文版ain a object and enum types

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

精彩评论

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