does array implements IEnumerable?

后端 未结 3 1189
北恋
北恋 2021-01-25 11:03

I know that the base abstract Array class doesn\'t implement generic IEnumerable as

public abstract class Array : ICloneable, IList, ICollection, IEnumerable, IS         


        
3条回答
  •  失恋的感觉
    2021-01-25 11:38

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

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

提交回复
热议问题