[英]C# array byte[].Length property
C# array byte[].Length property. C# 数组字节[].Length 属性。
byte[] buffer = new...字节 [] 缓冲区 = 新...
When call int i = buffer.Length;当调用 int i = buffer.Length; I can see get_Length() in reflector,我可以在反射器中看到 get_Length(),
What happens?怎么了? Does it calculate actual length or just takes value (like property)???它是计算实际长度还是只取值(如财产)???
Arrays are fixed-length; Arrays 是定长的; the Length
property returns an internal field in the array. Length
属性返回数组中的一个内部字段。
(It's O(1)
, not O(n)
) (这是O(1)
,而不是O(n)
)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.