且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

数组实现IEnumerable< T>吗?

更新时间:2022-01-24 14:46:38

有一个特殊类型SZArrayHelper-数组包装.这是源代码: https://referencesource.microsoft.com/#mscorlib /system/array.cs,aa97964558672440

There is special type SZArrayHelper - wrapper around array. Here is source code: https://referencesource.microsoft.com/#mscorlib/system/array.cs,aa97964558672440

此外,数组实现了IList,它实现了ICollection,并且实现了IEnumerable.因此,Array实现了IEnumerable

Also, array implements IList, and it implements ICollection and it implements IEnumerable. So, Array implements IEnumerable