哪个集合没有实现 IEnumerable
Which collection does not implement IEnumerable
System.Collections
下是否有任何类型的集合不继承自 IEnumerable
或 IEnumerable<T>
?
我需要一个例子。
No class directly inside System.Collections
将实现 IEnumerable<T>
- 命名空间早于 .NET 中的泛型 - 但是 classes 可以在那个命名空间中粗略地定义 "Collections" 全部实现 IEnumerable
- 数组列表
- 位数组
- 集合库
- 词典库
- 哈希表
- 队列
- ReadOnlyCollectionBase
- 排序列表
- 堆栈
如果我们扩展到 "Any namespace below System.Collections
",我们将进入 System.Collections.Generic
和 System.Collections.ObjectModel
和 System.Collections.Specialized
- 它们中的所有集合 classes 实现 IEnumerable
、IEnumerable<T>
或两者。
System.Collections
下是否有任何类型的集合不继承自 IEnumerable
或 IEnumerable<T>
?
我需要一个例子。
No class directly inside System.Collections
将实现 IEnumerable<T>
- 命名空间早于 .NET 中的泛型 - 但是 classes 可以在那个命名空间中粗略地定义 "Collections" 全部实现 IEnumerable
- 数组列表
- 位数组
- 集合库
- 词典库
- 哈希表
- 队列
- ReadOnlyCollectionBase
- 排序列表
- 堆栈
如果我们扩展到 "Any namespace below System.Collections
",我们将进入 System.Collections.Generic
和 System.Collections.ObjectModel
和 System.Collections.Specialized
- 它们中的所有集合 classes 实现 IEnumerable
、IEnumerable<T>
或两者。