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
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).