Pau*_*ter 7 c# arrays icollection
根据MSDN文档,System.Array实现ICollection,但System.Array不提供Count属性(当然,您总是可以使用LINQ Count()扩展方法,但是没有具有此名称的属性).怎么会这样?是不是需要数量?
它明确地实现如下:
int ICollection.Count
{
get
{
return Length;
}
}
Run Code Online (Sandbox Code Playgroud)
您可以在MSDN上阅读有关显式接口实现的更多信息.