.Net Rant

What’s wrong with the new dictionary objects? I can’t just go to the one item in the list that I want. I have to cycle through the entire list iteratively until I find the one I want. This is incredibly wasteful, stupid, nonobvious, and verbose.

VBS
myValue= myDic(myItem)

C#
foreach(DictionaryEntry obj in myDic)
{
if (obj.Key.ToString()==myItem.ToString())
{
myValue = obj.Value.ToString();
break;
}
}

Leave a Reply

You must be logged in to post a comment.