c# - System.Collections.IDictionaryEnumerator 优于 System.Collections.IEnumerator 的优点

标签 c# asp.net .net visual-studio

我对这个问题很困惑。

Which of the following advantages does System.Collections.IDictionaryEnumerator provide over System.Collections.IEnumerator?

a: It adds properties for direct access to both the Key and the Value
b: It is optimized to handle the structure of a Dictionary.
c: It provides properties to determine if the Dictionary is enumerated in Key or Value order
d: It provides reverse lookup methods to distinguish a Key from a specific Value

最佳答案

一个:是的

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

c: 字典未排序(内部排序但不在键上)

d: 绝对不会

重要的一点是它用于非通用词典。

关于c# - System.Collections.IDictionaryEnumerator 优于 System.Collections.IEnumerator 的优点,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8558569/

相关文章:

c# - 在不指定元数据端点的情况下使用 OpenIdConnect

使用 ReaderWriterLockSlim 的 C# 字典

.net - F# 允许在受歧视的联盟中相互引用案例吗?

c# - 用于绑定(bind)的 xaml 术语的差异

c# - 基于 .net 的帮助和支持/知识库

c# - ServiceStack AppHost 是单例吗?

c# - 如何强制 C# 异步操作以...同步方式运行?

c# - 根据新宽度计算新高度?

asp.net - 如何设置 DropDownList 中 ListItem 的对齐方式?

c# - 远离数据库实现事务有什么缺点?