且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

C#可以部分类"计划"类控制台应用程序?

更新时间:2023-02-17 21:08:06

您肯定的可以的做到这一点 - 但它听起来像你对我会更好的分割code成多类。如果你有多个方法类别这些类别可能是天然的阶级界限。

You certainly can do that - but it sounds to me like you'd be better off splitting your code into multiple classes. If you've got multiple method "categories" those categories may well be natural class boundaries.

一般来说,入口点类应该是相当小的。这并非总是如此,但它是一个很好的经验法则。通常它的唯一目的是让程序运行的剩余部分。

Generally speaking, the entry point class should be fairly small. That's not always the case, but it's a good rule of thumb. Usually its only purpose is to get the rest of the program running.