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
}
}
精彩评论