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
精彩评论