How many methods can a C# class have

DHornpout picture DHornpout · Sep 12, 2009 · Viewed 7.7k times · Source

Is there a limitation on number of properties, methods a C# class can have?

I do a quick skim at Standard ECMA-334 and did not find any information on it.

Before jumping into why a class with many methods are bad design, I want to be more clear on the intention. Of course I will not be writing a class with large number of methods manually. The reason I am asking this is I need to generate a large number of execution units by code. I am debate between have multiple classes with single method or one large class with multiple methods.

So for this question, I am only interest if is there a limit and what is the limit for number of properties, methods.

Answer

leppie picture leppie · Sep 12, 2009

16.7 million per assembly per method (not class).