一个文件的最大行数? [英] Max line count of one file?

查看:112
本文介绍了一个文件的最大行数?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

一个.cs文件应容纳的最大代码行数。有任何行业标准/最佳实践吗?

How many max number of lines of code one .cs file should hold. Are there any industry standards/best practices?

推荐答案

我不知道多少,但是有一个数字被认为是

I don't know how much, but there is a number which is considered a best practice.

这与可维护性有关,而不仅仅是源文件中的行数。一个类中的方法数量呢?圈复杂度的一种方法?项目中的类数?

It's all about maintainability, and there's much more to it than the number of lines in a source file. What about number of methods in a class? Cyclomatic complexity of a method? Number of classes in a project?

最好在源代码上运行代码度量工具以了解更多信息,例如 NDepend

It's best to run a code metrics tool on your source code to find out more, like NDepend.

这篇关于一个文件的最大行数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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