Array T[] IList IList<T>
它们之间的关系如下
T[] : Array, IList<T>, ICollection<T>, IEnumerable<T>       --这层的关系比较隐含
Array : ICloneable, IList, ICollection, IEnumerable

如下:
typeof(string[]).GetInterfaces()
结果:
{System.Type[7]}
    [0]: {Name = "ICloneable" FullName = "System.ICloneable"}
    [1]: {Name = "IList" FullName = "System.Collections.IList"}
    [2]: {Name = "ICollection" FullName = "System.Collections.ICollection"}
    [3]: {Name = "IEnumerable" FullName = "System.Collections.IEnumerable"}
    [4]: {Name = "IList`1" FullName = "System.Collections.Generic.IList`1[[System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]"}
    [5]: {Name = "ICollection`1" FullName = "System.Collections.Generic.ICollection`1[[System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]"}
    [6]: {Name = "IEnumerable`1" FullName = "System.Collections.Generic.IEnumerable`1[[System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]"}

相关文章:

  • 2021-05-25
  • 2022-02-20
  • 2022-12-23
  • 2021-08-13
  • 2021-06-28
  • 2022-12-23
  • 2021-10-14
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-08-06
  • 2022-12-23
  • 2021-06-20
  • 2021-12-14
  • 2021-06-24
相关资源
相似解决方案