Array.Length VS Array.CountLength、Array、Count、VS

2023-09-03 04:10:24 作者:天空丶唯独想你

可能重复:   数与长度VS大小集合

在.NET中,pretty的很多藏品都具有 .Count之间属性。

In .NET, pretty much all collections have the .Count property.

有时候我怀疑这将是最好有它阵列以及,直接虽然,而不是通过的ICollection

Sometimes I wonder if it would be better to have it on Array as well, directly though, not through ICollection.

这只是一些你在你的脑子里只有数组一个例外。

It's just something you make an exception in your mind only for arrays.

因此​​,它是更好地更正确,或在这种情况下更加统一?

So is it better to be "more correct" or "more uniform" in this case?

推荐答案

查看回答以下几个相关的问题

See the answers to the following related question

http://stackoverflow.com/questions/300522/count-vs-length-vs-size-in-a-collection
 
精彩推荐
图片推荐