开发者

Array Length/LongLength in .NET [duplicate]

This question already has answers here: Closed 11 years ago.

Possible Duplicate:

What is the maximum length of an array in .NET on 64-bit Wind开发者_开发技巧ows

What is the exact maximum theoretical size of an array on a x86 platform in .NET? Is is given by Int32.MaxValue or UInt32.MaxValue?


In theory it's 2,147,483,647 item (ie 2GB) at it uses an int. However, given that an array is a contiguous block of memory of memory and a process can only have 2GB of userspace you'll never actually be able to populate an array of this size as your userspace will have code and other app data in it which will reduce space available.


It is determined by the value of Int32.MaxValue

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜