Are there any collection classes or special data types that support more than 2 ^ 31 items in .NET 3.5?

后端 未结 1 1265
南旧
南旧 2021-01-15 06:35

I am currently using VS 2008 64 bit edition, 3.5 framework with SP1. However, it appears that the collection classes like List have a limit of 2^31 (or max value of an int)

相关标签:
1条回答
  • 2021-01-15 06:49

    I am pretty sure there are no builtin collections that can handle more than Int32.MaxValue entries. The reason is because the .NET Framework still has ~2GB limit for objects even for the 64-bit version. Int32.MaxValue entries of one byte bumps up against this limit. I believe Mono's memory limit is larger, but I cannot definitely confirm that.

    You can work around this limitation using the BigArray implemenation from here.

    0 讨论(0)
提交回复
热议问题