Like many other programmers, I went into primes, and as many of them, what I like is the challenge, so I\'m not looking for comment like Atkin did this faster than you d
From your link:
Using this element in your application configuration file enables arrays that are larger than 2 GB in size, but does not change other limits on object size or array size:
The maximum index in any single dimension is 2,147,483,591 (0x7FFFFFC7) for byte arrays and arrays of single-byte structures, and 2,146,435,071 (0X7FEFFFFF) for other types.
See also What is the maximum length of an array in .NET on 64-bit Windows:
An array could theoretically have at most 2,147,483,647 elements, since it uses an int for indexing.
If you hit the bounds of the integer max range, you can opt to use a long
-index-based array.
The problem is that this isn't supported by the C# indexer properties, which uses int
. You can build them by hand though by using Array.CreateInstance(Type, long[]).
Note you have to get the values using Array.GetValue(long).