Actually, I would guess there is a limit because of the limitation of
the Length propery. In the 1.0 version of the framework, the Length
property was a 32 bit integer, and because of that, you were limited to two
billion or so elements.
With the 1.1 version of the framework, you have the LongLength property,
which exposes the length in a 64 bit integer, which means you have an upper
limit of 9,223,372,036,854,775,808 elements (needless to say, a lot).
However, what you are running into, like Miha said, is probably because
of a memory constraint. To the original poster, do you really need to have
that many elements in the array? What are you trying to do? Depending on
the type of your elements, the memory alone for such an array could be
restrictive in terms of performance.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)
Miha Markic said:
Hi tony,
I don't think that .net has such limitations.
I would say that it is a memory issue.
--
Miha Markic - RightHand .NET consulting & software development
miha at rthand com
tony collier said:
i have created a 7-dimensional array [11,11,11,11,11,11,11] which has 19.5
million elements.
when i try to create 8-dimensional array i get out of bounds system
exception. does anyone know if this limitation is due to amount of memory
in my pc or a limiation of c# language?
thanks