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]]"}