Reputation: 6492
Is there a limitation (perhaps a compiler limitation) on the size of a class in ASP.NET 3.5?
I have a single class file that is going to keep growing and could become quite large (easily 100k lines of code, or 10k members).
I simply need to know if there is a limit on lines of code, or raw file size, or quantity of members in a single class.
Please do not ask why I'm doing something that sounds both stupid and crazy; I'm well aware of the consequences of such an approach.
Upvotes: 1
Views: 2458
Reputation: 43817
FWIW, I had a file with 165k lines of code (~6MB) that I had generated with a tool of mine (it was meant to load some test data).
On Linux (Ubuntu 16.04) I received a System.AccessViolationException when I attempted to use the type in the file.
So it would seem there is indeed some limit.
I should mention this was using .NET Core 2.0
Upvotes: 0