Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

C# array with capacity over Int.MaxValue

I was wondering if there is any structure in C# that can contain more than Int.MaxValue's restriction of 2,147,483,647 items, in case of really large sets of information. Would this have to be done with multi level arrays? Or could you create an array that has a maximum length of Long.MaxValue? If so, how?

like image 783
Richard J. Ross III Avatar asked Sep 07 '10 12:09

Richard J. Ross III


1 Answers

It's been done, a sample BigArray<T> implementation is here.

like image 120
Hans Passant Avatar answered Sep 17 '22 13:09

Hans Passant