有几种方法可以在C#类有几种方法

2023-09-03 00:50:08 作者:﹏、尛爺*半生沉浮゛

是否有多个属性,方法C#类可以有限制吗?

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

我做一个快速脱脂在标准ECMA-334,并没有发现它的任何信息。

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

在跳进为什么一个类有许多方法都是不好的设计,我想成为的意图更加清晰。当然,我也不会写一个类有大量的方法手动。我问这个的原因是我需要生成由code大量执行单元。我辩论之间有多个班级,一个方法或者一个大类有多种方法。

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.

推荐答案

1670万每方法(而不是类)的装配。

16.7 million per assembly per method (not class).