Class limitations

  • Thread starter Thread starter Smokey Grindle
  • Start date Start date
S

Smokey Grindle

Is there any real or virtual class size limitations? such as number of
methods, properties or fields? I know its bad practice to make a class
outragiously large, but was just wondering if there was any. thanks!
 
Is there any real or virtual class size limitations? such as number of
methods, properties or fields? I know its bad practice to make a class
outragiously large, but was just wondering if there was any. thanks!

I can't imagine there is one, but I'm no expert on things like that.
However, I have seen classes that were very large in production
applications running without problem. Curiousity or do you have a 300
Method class on the way?
 
You could easily do some code that creates a class with dummy members for a
test. IMO the limit is likely theorical...
 
Smokey Grindle said:
Is there any real or virtual class size limitations? such as number of
methods, properties or fields? I know its bad practice to make a class
outragiously large, but was just wondering if there was any. thanks!

I believe there is no practically relevant limit.
 
Smokey,

Everything inherits from one class and that class has than many members.

"Object"

Cor
 
Smokey said:
Is there any real or virtual class size limitations? such as number of
methods, properties or fields? I know its bad practice to make a class
outragiously large, but was just wondering if there was any. thanks!

There might be some limitations in the compiler or in the file format
for the compiled code. I would expect to see something like a limit of
2147483647 methods in a class.

IIRC 32 bit code can not handle memory structures larger than 4 GB.
 
just curious

Charlie Brown said:
I can't imagine there is one, but I'm no expert on things like that.
However, I have seen classes that were very large in production
applications running without problem. Curiousity or do you have a 300
Method class on the way?
 
Back
Top