有几种方法可以在C#类有 [英] How many methods can a C# class have

查看:101
本文介绍了有几种方法可以在C#类有的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有多个属性,方法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).

这篇关于有几种方法可以在C#类有的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆