Is there any type of collection under System.Collections
that does not inherit from IEnumerable
or IEnumerable<T>
?
I need an example.
No class directly inside System.Collections
will implement IEnumerable<T>
- that namespace predates generics in .NET - however the classes which could roughly be defined "Collections" in that namespace all implement IEnumerable
If we expand to "Any namespace below System.Collections
" we get into System.Collections.Generic
and System.Collections.ObjectModel
and System.Collections.Specialized
- all the collections classes inside them implement IEnumerable
, IEnumerable<T>
or both.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.