System.Collections.IDictionaryEnumerator相对于System.Collections.IEnumerator的优势

3

我对这个问题感到非常困惑。

System.Collections.IDictionaryEnumerator相比System.Collections.IEnumerator提供以下哪些优势?

a: 它添加了直接访问Key和Value的属性
b: 它针对字典结构进行了优化
c: 它提供了确定Dictionary是按Key还是按Value顺序枚举的属性
d: 它提供反向查找方法以区分Key和特定Value

1个回答

5

a: 是的

b: Enumerator不处理集合,它只是枚举它们。

c: 字典是没有排序的(内部是有序的,但不是按键排序)。

d: 绝对不行。

重要的是,它用于非泛型字典。


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接