Max Array index

  • Thread starter Thread starter Freddy
  • Start date Start date
F

Freddy

Hi,

What is the maximum number of items that a single or multi dimensional array
can hold?

Regards,

Freddy
 
Hi,

The limit is System.Int64.MaxValue, but I can't tell you how exactly this
applies for each demension for multidimensional and jagged arrays. The limit
is the amount of physical memory on the computer. Int64.MaxValue equals
9,223,372,036,854,775,807 or hexadecimal: 0x7FFFFFFFFFFFFFFF (fifteen F's),
so you can imagine what amount of memory you will need to create such an
array with booleans - 1 exabyte (1 million terabytes).

Greetings
Martin
 
Thanks Martin

Martin Dechev said:
Hi,

The limit is System.Int64.MaxValue, but I can't tell you how exactly this
applies for each demension for multidimensional and jagged arrays. The
limit
is the amount of physical memory on the computer. Int64.MaxValue equals
9,223,372,036,854,775,807 or hexadecimal: 0x7FFFFFFFFFFFFFFF (fifteen
F's),
so you can imagine what amount of memory you will need to create such an
array with booleans - 1 exabyte (1 million terabytes).

Greetings
Martin
 
Back
Top