Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
I know, that size of object is limited to 2GB in .NET,
but what about maximum size of more complex objects, like DataTable?
It depends on low-level objects inside?
更复杂的对象仍然是内部的对象,它们包含对其他对象的引用。例如,如果是这样,DataTable则它包含对每一行的引用等。对于操作系统类型,每个指针将占用 32 位或 64 位。只有指针大小是总和,对象图深度没有限制(合理)。在这种情况下,您唯一的限制是可以为进程本身分配的最大内存量。
DataTable
关于行,DataTable 可以存储的最大行数是 16,777,216。